[Solved] Unable to update changed address for Mythtv

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

Moderator: Forum Moderators

Post Reply
williamatwood
Junior
Posts: 63
Joined: Sun Feb 12, 2017 8:08 pm
Canada

[Solved] Unable to update changed address for Mythtv

Post by williamatwood »

Due to a change of ISP, the IP address of my combined frontend and backend had to change from 192.168.1.26 to 192.168.2.26. When I run mythtv-setup, instead of the setup pages indicated in the Wiki (which would allow me to do all aspects of setup), I get a page that announces that the DB failed to start. I press on the "Setup" button, and it allows me to change the IP address of the Database. I then save the changes and exit. This then starts the search for the database over again, and brings me back to the same error message. Restarting Ubuntu and then running mythtv-setup repeats the above result. The new address for the database is shown with the correct value in the setup page, and the correct address is found in /home/bill/.mythtv/config.xml. Realizing that startup will happen sometimes with "bill" and sometimes with "mythtv" as the user name, I changed /home/mythtv/.mythtv/config.xml to also have the correct address. I get exactly the same result: "The database failed to start".

So, two questions:
1) How can I ensure that all the places where the new address is needed have been changed?
2) How can I get mythtv-setup to go to the right setup screens?

My version is given below:

Code: Select all

bill@Acacia:~$ mythbackend --version
Please attach all output as a file in bug reports.
MythTV Version : v31.0+fixes.202203040618.7e4ce1ba98~ubuntu20.04.1
MythTV Branch : fixes/31
Network Protocol : 91
Library API : 31.20200101-1
QT Version : 5.12.8
Options compiled in:
 linux profile use_hidesyms using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_dvb using_firewire using_frontend using_hdhomerun using_vbox using_ceton using_hdpvr using_ivtv using_joystick_menu using_libcec using_libcrypto using_gnutls using_libdns_sd using_libfftw3 using_libxml2 using_lirc using_mheg using_opengl using_egl using_qtwebkit using_qtscript using_qtdbus using_taglib using_v4l2 using_x11 using_libbluray_external using_xrandr using_profiletype using_systemd_notify using_systemd_journal using_bindings_perl using_bindings_python using_bindings_php using_freetype2 using_mythtranscode using_opengl using_egl using_vaapi using_nvdec using_vdpau using_ffmpeg_threads using_mheg using_libass using_libxml2 using_libmp3lame
bill@Acacia:~$
Any help will be very much appreciated!
blm-ubunet
Senior
Posts: 265
Joined: Sun Jun 15, 2014 1:08 am
Cambodia

Re: Unable to update changed address for Mythtv

Post by blm-ubunet »

You need check that the DB server is listening on either localhost or the new static IP4.
This may be different for mariadb but..
That's in the /etc/mysql/mysql.conf.d/mysqld.cnf or similar

bind-address = 127.0.0.1

Just because its FOSS.. the syntax of these files changes regularly & between mariadb & mysql & month of year, so confirm with apps home page or MythTV wiki.

For combined BE FE then DB server can just set to listen on localhost & be IP address independent.
And I recall that there were MythTV DB table values dependent on IP values (could be historic).. some "host" settings may be lost.

The MythTV wiki has info about this under database restore & backup.
white_haired_uncle
Senior
Posts: 244
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: Unable to update changed address for Mythtv

Post by white_haired_uncle »

What do these show?

$ netstat -an | grep 3306

$ sudo systemctl status mysql # I know you're using mariaDB, but it's still mysql
williamatwood
Junior
Posts: 63
Joined: Sun Feb 12, 2017 8:08 pm
Canada

Re: Unable to update changed address for Mythtv

Post by williamatwood »

The file /etc/mysql/mysql.conf.d/mysqld.cnf contains:

Code: Select all

bind-address            = 127.0.0.1
mysqlx-bind-address     = 127.0.0.1
The output from the first requested command is:

Code: Select all

bill@Acacia:/etc/mysql/mysql.conf.d$ netstat -an |grep 3306
tcp        0      0 127.0.0.1:33060         0.0.0.0:*               LISTEN
The output from the second requested command is:

Code: Select all

● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: activating (start) since Thu 2023-06-01 16:51:39 EDT; 2s ago
    Process: 153748 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
   Main PID: 153756 (mysqld)
     Status: "Server startup in progress"
      Tasks: 33 (limit: 9338)
     Memory: 373.6M
     CGroup: /system.slice/mysql.service
             └─153756 /usr/sbin/mysqld

Jun 01 16:51:39 Acacia systemd[1]: Starting MySQL Community Server...
Jun 01 16:51:45 Acacia systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Jun 01 16:51:45 Acacia systemd[1]: mysql.service: Failed with result 'exit-code'.
Jun 01 16:51:45 Acacia systemd[1]: Failed to start MySQL Community Server.
Jun 01 16:51:46 Acacia systemd[1]: mysql.service: Scheduled restart job, restart counter is at 2996.
Jun 01 16:51:46 Acacia systemd[1]: Stopped MySQL Community Server.
Jun 01 16:51:46 Acacia systemd[1]: Starting MySQL Community Server...
User avatar
bill6502
Developer
Posts: 2299
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Unable to update changed address for Mythtv

Post by bill6502 »

The above shows the SQL server is listening on port 33060, not 3306?
williamatwood
Junior
Posts: 63
Joined: Sun Feb 12, 2017 8:08 pm
Canada

Re: Unable to update changed address for Mythtv

Post by williamatwood »

No, it indicates that "something" is listening on port 33060.
However, I found the problem: /etc/mysql/conf.d/mythtv.cnf was still binding to 192.168.1.26. Changing the bind to 192.168.2.26 allowed me to get past the "database not starting" error page, and brought me to the expected set of setup pages. When I exited setup, and permitted startup of the backend, the netstat command showed the following:

Code: Select all

bill@Acacia:~$ netstat -an |grep 3306
tcp        0      0 127.0.0.1:33060         0.0.0.0:*               LISTEN
tcp        0      0 192.168.2.26:3306       0.0.0.0:*               LISTEN
tcp        0      0 192.168.2.26:3306       192.168.2.26:55532      ESTABLISHED
tcp        0      0 192.168.2.26:3306       192.168.2.26:35388      ESTABLISHED
tcp        0      0 192.168.2.26:35432      192.168.2.26:3306       ESTABLISHED
tcp        0      0 192.168.2.26:35460      192.168.2.26:3306       ESTABLISHED
tcp        0      0 192.168.2.26:56176      192.168.2.26:3306       ESTABLISHED
tcp        0      0 192.168.2.26:35388      192.168.2.26:3306       ESTABLISHED
tcp        0      0 192.168.2.26:47664      192.168.2.26:3306       ESTABLISHED
tcp        0      0 192.168.2.26:35448      192.168.2.26:3306       ESTABLISHED
tcp        0      0 192.168.2.26:3306       192.168.2.26:56176      ESTABLISHED
tcp        0      0 192.168.2.26:55532      192.168.2.26:3306       ESTABLISHED
tcp        0      0 192.168.2.26:35424      192.168.2.26:3306       ESTABLISHED
tcp        0      0 192.168.2.26:3306       192.168.2.26:35432      ESTABLISHED
tcp        0      0 192.168.2.26:3306       192.168.2.26:35448      ESTABLISHED
tcp        0      0 192.168.2.26:3306       192.168.2.26:47664      ESTABLISHED
tcp        0      0 192.168.2.26:3306       192.168.2.26:35460      ESTABLISHED
tcp        0      0 192.168.2.26:35454      192.168.2.26:3306       TIME_WAIT
tcp        0      0 192.168.2.26:3306       192.168.2.26:35424      ESTABLISHED
bill@Acacia:~$
Clearly the whole world and his dog is now connected to mysql.

And my remote frontend (Kodi) works just fine.

Thank you all for your quick responses.

Bill
blm-ubunet
Senior
Posts: 265
Joined: Sun Jun 15, 2014 1:08 am
Cambodia

Re: Unable to update changed address for Mythtv

Post by blm-ubunet »

I did say "or similar" !

Based on creation dates on my desktop PC..
I think the conf.d/ is the old subfolder & now it uses mysql.conf.d/ because...
And then it uses both to be safe..
User avatar
bill6502
Developer
Posts: 2299
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Unable to update changed address for Mythtv

Post by bill6502 »

For future readers, the directories above are parsed in the order defined in mysql.cnf:

Code: Select all

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
Or for mariadb.cnf:

Code: Select all

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/
Post Reply