Database address update
Moderator: Forum Moderators
Database address update
Hi Folks!
Had to have a new router which updated my general dotted quad IP addresses. Able to update the Backend and probably the Frontends but the problem is the database address keeps going back to the old address. Using Version 30 and I think the database is mariadb (have /etc/mysqlmariadb.congf.d).
mythtv-setup (also tried sudo) goes to the GUI which states “Database failed to start” then takes maybe five minutes to do anything after I click the Setup button. The Hostname address is always “192.168.0.3”, the old one; I change to 192.168.4.3 (the new address of the Backend) and it is accepted but then reverts back to the old .0.3 address – immediately seen on running mythfilldatabase.
So where is this sneaky little file I need to correct where the database is looking?
TIA
Barry
Had to have a new router which updated my general dotted quad IP addresses. Able to update the Backend and probably the Frontends but the problem is the database address keeps going back to the old address. Using Version 30 and I think the database is mariadb (have /etc/mysqlmariadb.congf.d).
mythtv-setup (also tried sudo) goes to the GUI which states “Database failed to start” then takes maybe five minutes to do anything after I click the Setup button. The Hostname address is always “192.168.0.3”, the old one; I change to 192.168.4.3 (the new address of the Backend) and it is accepted but then reverts back to the old .0.3 address – immediately seen on running mythfilldatabase.
So where is this sneaky little file I need to correct where the database is looking?
TIA
Barry
Re: Database address update
If it's a file that's needed: https://www.mythtv.org/wiki/Config.xml#Troubleshooting
Re: Database address update
Hi Bill!
Thanks for the quick reply!
Looked for config.xml using find; four files, none have the old IP address inside.
Barry
Thanks for the quick reply!
Looked for config.xml using find; four files, none have the old IP address inside.
Barry
Re: Database address update
Next step, take MythTV out of the picture. Using the user, password and address
from config.xml:
If that doesn't work, MythTV won't. If there's an error message, that may
give you a clue to the reason for the failure.
from config.xml:
Code: Select all
mysql --user=mythtv --password --host=<your DB IP or hostname> mythconverg
give you a clue to the reason for the failure.
Re: Database address update
Hi Bill!
Your command line...
I entered: connect 192.168.4.3
Response: error 1044 (42000): Access denied for user 'mythtv'@'%' to database '192.168.4.3' followed by (next/command line)
unknown [192.168.4.3]>
(And I ^C to exit)
Barry
Your command line...
I entered: connect 192.168.4.3
Response: error 1044 (42000): Access denied for user 'mythtv'@'%' to database '192.168.4.3' followed by (next/command line)
unknown [192.168.4.3]>
(And I ^C to exit)
Barry
Re: Database address update
sudo grep -r "bind.address" /etc/my*
Re: Database address update
I don't recognize "connect 192.168.4.3". The mysql command is
a good test.
a good test.
Re: Database address update
Hi Bill!
For sudo grep -r "bind.address" /etc/my* ==>
/etc/mysql/conf.d/mythtv.cnf:bind-address=::
/etc/mysql/mariadb.conf.d/50-server.cnf:# bind-aadress = 127.0.0.1
/etc/mysql/mysql.conf.d/mysqld.conf:# bind-address = 127.0.01
As for the “I don't recognize "connect 192.168.4.3". The mysql command is a good test” inquiry:
mysql --user=mythtv --password --host=<your DB IP or hostname> mythconverg
(Asks for the mythtv password, entered).
At that point just sat there: prompt is ‘MariaDB [mythconverg]>’ (cursor sitting here).
I entered “connect 192.168.4.3” at the prompt, try to get it to connect to that IP. Sorry for the confusion.
Barry
For sudo grep -r "bind.address" /etc/my* ==>
/etc/mysql/conf.d/mythtv.cnf:bind-address=::
/etc/mysql/mariadb.conf.d/50-server.cnf:# bind-aadress = 127.0.0.1
/etc/mysql/mysql.conf.d/mysqld.conf:# bind-address = 127.0.01
As for the “I don't recognize "connect 192.168.4.3". The mysql command is a good test” inquiry:
mysql --user=mythtv --password --host=<your DB IP or hostname> mythconverg
(Asks for the mythtv password, entered).
At that point just sat there: prompt is ‘MariaDB [mythconverg]>’ (cursor sitting here).
I entered “connect 192.168.4.3” at the prompt, try to get it to connect to that IP. Sorry for the confusion.
Barry
Re: Database address update
‘MariaDB [mythconverg]> is the expected prompt. exit to exit. T
The bind-address allows all IPv4 and IPv6 addresses, go that's good too.
If mythtv-setup is failing, then I'd start it from the command line with the --logpath=/tmp
switch (as that gets the best logging) and look at the output in /tmp.
If using Ubuntu, then use mythtv-setup.real.
The bind-address allows all IPv4 and IPv6 addresses, go that's good too.
If mythtv-setup is failing, then I'd start it from the command line with the --logpath=/tmp
switch (as that gets the best logging) and look at the output in /tmp.
If using Ubuntu, then use mythtv-setup.real.
Re: Database address update
Hi Bill!
Oops, forgot to state I am using Ubuntu 18.04. Tried mythtv-setup.real … Goes to the Startup Status screen, Database failed to start. Click <setup> wait the five minutes or so…. Can change the GUI’s IP field but as before doesn’t take (was hoping this command would work).
Reboot to get clear start.
So mythtv-setup.real –logpath=/tmp ==> <setup> ...Update the IP address while I’m in there…. So far waiting seven minutes to exit…. Exited to the BE Config screen and time stuck at 7:04 p.m., the clock at the top is clicking away and now 19:15:13….. “CAT” to Terminal (immediate open) and ...I’m not going to type that in! Log is at https://pastebin.com/UnpEbTHw
Guess I’ll see you tomorrow with that mess! Thanks for your assistance!
Barry
Oops, forgot to state I am using Ubuntu 18.04. Tried mythtv-setup.real … Goes to the Startup Status screen, Database failed to start. Click <setup> wait the five minutes or so…. Can change the GUI’s IP field but as before doesn’t take (was hoping this command would work).
Reboot to get clear start.
So mythtv-setup.real –logpath=/tmp ==> <setup> ...Update the IP address while I’m in there…. So far waiting seven minutes to exit…. Exited to the BE Config screen and time stuck at 7:04 p.m., the clock at the top is clicking away and now 19:15:13….. “CAT” to Terminal (immediate open) and ...I’m not going to type that in! Log is at https://pastebin.com/UnpEbTHw
Guess I’ll see you tomorrow with that mess! Thanks for your assistance!
Barry
Re: Database address update
This please: ls -ld {~,~mythtv}/.mythtv/config.xml /etc/mythtv/config.xml
(looking for permissions/links.) Likely unset, but: echo $MYTHCONFDIR
(looking for permissions/links.) Likely unset, but: echo $MYTHCONFDIR
Re: Database address update
Easiest way to fix this is to just assign your old system ip address as static in your new router. Then everything is the same as before. It's usually self explanatory, but if not, consult your new routers manual.
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.
Re: Database address update
Info only, this is also being discussed on: http://lists.mythtv.org/pipermail/mytht ... 03958.html
Re: Database address update
Hi Bill!
barry@Backend-3:~$ ls -ld {~,~mythtv}/.mythtv/config.xml /etc/mythtv/config.xml
-rw-rw---- 1 mythtv mythtv 452 May 7 14:13 /etc/mythtv/config.xml
-rw-r--r-- 1 barry barry 799 Jun 20 18:14 /home/barry/.mythtv/config.xml
lrwxrwxrwx 1 root root 22 May 12 2019 /home/mythtv/.mythtv/config.xml -> /etc/mythtv/config.xml
barry@Backend-3:~$
With "/home/mythtv/.mythtv/config.xml" in the last entry in light blue on black. (I recall there's some colour-coding for file types.)
As for the next question:
barry@Backend-3:~$ echo $MYTHCONFDIR
barry@Backend-3:~$
So I'm presuming the expected unset value but it did skip a line.
Thanks!
Barry
Re: Database address update
Yes, MYTHCONFDIR isn't in play. Just covering my bases.
Just responded on the -users list about the broken link above. And asked for a
retest of the mysql command.
Probably better to stay -users list, not the Forum too.
Just responded on the -users list about the broken link above. And asked for a
retest of the mysql command.
Probably better to stay -users list, not the Forum too.