Database address update

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Barry_IA
Newcomer
Posts: 7
Joined: Thu Apr 21, 2016 6:33 pm
United States of America

Database address update

Post by Barry_IA »

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
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Database address update

Post by bill6502 »

Barry_IA
Newcomer
Posts: 7
Joined: Thu Apr 21, 2016 6:33 pm
United States of America

Re: Database address update

Post by Barry_IA »

Hi Bill!

Thanks for the quick reply!

Looked for config.xml using find; four files, none have the old IP address inside.

Barry
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Database address update

Post by bill6502 »

Next step, take MythTV out of the picture. Using the user, password and address
from config.xml:

Code: Select all

mysql --user=mythtv --password --host=<your DB IP or hostname> mythconverg
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.
Barry_IA
Newcomer
Posts: 7
Joined: Thu Apr 21, 2016 6:33 pm
United States of America

Re: Database address update

Post by Barry_IA »

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
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Database address update

Post by bill6502 »

sudo grep -r "bind.address" /etc/my*
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Database address update

Post by bill6502 »

I don't recognize "connect 192.168.4.3". The mysql command is
a good test.
Barry_IA
Newcomer
Posts: 7
Joined: Thu Apr 21, 2016 6:33 pm
United States of America

Re: Database address update

Post by Barry_IA »

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
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Database address update

Post by bill6502 »

‘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.
Barry_IA
Newcomer
Posts: 7
Joined: Thu Apr 21, 2016 6:33 pm
United States of America

Re: Database address update

Post by Barry_IA »

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
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Database address update

Post by bill6502 »

This please: ls -ld {~,~mythtv}/.mythtv/config.xml /etc/mythtv/config.xml
(looking for permissions/links.) Likely unset, but: echo $MYTHCONFDIR
wesnewell
Senior
Posts: 731
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: Database address update

Post by wesnewell »

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.
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Database address update

Post by bill6502 »

Info only, this is also being discussed on: http://lists.mythtv.org/pipermail/mytht ... 03958.html
Barry_IA
Newcomer
Posts: 7
Joined: Thu Apr 21, 2016 6:33 pm
United States of America

Re: Database address update

Post by Barry_IA »

bill6502 wrote:
Sun Jun 21, 2020 2:36 pm
This please: ls -ld {~,~mythtv}/.mythtv/config.xml /etc/mythtv/config.xml
(looking for permissions/links.) Likely unset, but: echo $MYTHCONFDIR
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
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Database address update

Post by bill6502 »

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.
Post Reply