Mysql login fails after change in IP address

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

Moderator: Forum Moderators

Post Reply
Jessica12345
Newcomer
Posts: 6
Joined: Fri Mar 08, 2024 1:30 am
United States of America

Mysql login fails after change in IP address

Post by Jessica12345 »

I had a wonderful working mythtv system for several years, consisting of a remote backend and several frontend machines. I moved to a new home recently, and couldn't get the old router to work with the new modem+router that the cable company requires, and so now all of the old IP addresses are no longer valid. So where I'm at now is that I just can't seem to log into mysql, either through the backend or command line, using anything other than root.

This command works:

Code: Select all

sudo mysql -u root
This command does not work:

Code: Select all

mysql -h [hostname] -u mythtv -p mythconverg
I tried setting hostname to everything I can think of, all of the old IPs, new IPs, local host, etc. What happens is that it just hangs and doesn't do anything after I enter the password. I have to CTRL+C to kill the process after a minute or so.

Any ideas of what might be going on with the login?
Jessica12345
Newcomer
Posts: 6
Joined: Fri Mar 08, 2024 1:30 am
United States of America

Re: Mysql login fails after change in IP address

Post by Jessica12345 »

Sorry, forgot to mention, I did create new users with new host names. Initially I forgot to set the password for those users, and at that point, whenever I try to log in, it said access denied. Once I set the password, that's when it just hangs and freezes up when I try to log in.
white_haired_uncle
Senior
Posts: 730
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: Mysql login fails after change in IP address

Post by white_haired_uncle »

Jessica12345 wrote: Wed Jul 01, 2026 3:35 pm I had a wonderful working mythtv system for several years, consisting of a remote backend and several frontend machines. I moved to a new home recently, and couldn't get the old router to work with the new modem+router that the cable company requires,
I put my router between the cable modem/router and everything else (so the cable modem just sees one "client"). I would think that if you did the same nothing in your home would look any different really (for certain definitions of "nothing"). Or maybe you're saying you did that and it's not working, in which case I'm reminded of the days when once you connected something (say a laptop for a quick test) to their modem you couldn't connect anything else (like replacing the laptop with your router) unless you told the new device to use the MAC of the old one. But that was back in the day when the cable modems only had one ethernet port for your LAN.
Jessica12345 wrote: Wed Jul 01, 2026 3:35 pm So where I'm at now is that I just can't seem to log into mysql, either through the backend or command line, using anything other than root.
You may want to clarify that, "anything other than root".

When you do one of these:

Code: Select all

$ sudo mysql 
$ sudo mysql -h localhost
you're using a unix socket, while these

Code: Select all

$ sudo mysql -h [hostname]
$ sudo mysql -h 127.0.0.1
use a network socket. So, it's possible that it's not really "anything other than root", it's "unless I use a unix socket" (which will most likely only work for root by default, BTW).

I don't know much about the mysql login process to know if this fits your situation, but based on the IP/router change I have to wonder if you have DNS pointed at some inaccessible device. Could be a stupid theory, but it's a theory.

P.S. You should probably mention what OS you're running, and mysql version at a minimum. "select User,Host,Plugin from mysql.user" might not be a terrible idea.
Jessica12345
Newcomer
Posts: 6
Joined: Fri Mar 08, 2024 1:30 am
United States of America

Re: Mysql login fails after change in IP address

Post by Jessica12345 »

Thanks for the response, it seems like it was mainly just my mistakes in setting the user passwords, then the IP addresses weren't fully updated in all of the separate config.xml files and in the backend setup.
Jessica12345
Newcomer
Posts: 6
Joined: Fri Mar 08, 2024 1:30 am
United States of America

Re: Mysql login fails after change in IP address

Post by Jessica12345 »

Well I replied too soon, the remote frontend isn't able to connect. The question now is, what file contains the IP address for the DB? When I launch the frontend on the remote machine, I see the BE address correctly updated but the DB address still shows the old one. I changed it in the config.xml file in ~/.mythtv, /home/mythtv/.mythtv, and /etc/mythtv. I'm not sure where else to look. It's a very specific address, the old one was 192.168.0.31, new is 192.168.1.45. The mythfrontend, when launched from a terminal, shows in the terminal output that BE is 192.168.1.45 but DB is still set at 192.168.0.31. I checked the mysql bind address, that is not set.
white_haired_uncle
Senior
Posts: 730
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: Mysql login fails after change in IP address

Post by white_haired_uncle »

The address for the DB is in ~/.mythtv/config.xml. Using that, it talks to the database and gets the name or address of the master backend. So it kind of sounds like maybe you just mixed up DB and BE in your post and the old address is in the database. And if the DB address is wrong, there should be no BE address to be shown, But then there's a problem with that theory if the backend works (assuming all other things equal).

Also, /etc/hosts comes immediately to mind, but only if you're using hostnames and it sounds like you're using IPs. Keywords: sounds like.

Be easier if you'd post the output of mythfrontend from the terminal, specifically this part:

Code: Select all

2026-07-08 08:50:52.956202 N  Using configuration directory = /home/whu/.mythtv
...
2026-07-08 08:50:52.959940 I  Using a profile name of: 'spartan' (Usually the same as this host's name.)
2026-07-08 08:50:52.960368 I  Start up testing connections. DB hawkeye, BE , attempt 0, status dbAwake, Delay: 2000
And ~/.mythtv/config.xml for the user launching mythfrontend. And this from the database host:

Code: Select all

sudo mysql mythconverg -e "select * from settings where value like 'MasterS%' or  value like 'Backend%' "
And /etc/hosts from the frontend system while you're at it.

P.S. Maybe you've mixed up DB and BE, AND /etc/hosts has the old address on the frontend? That would explain things.
Post Reply