[mythtv-users] Can't connect to database

Stephen Worthington stephen_agent at jsw.gen.nz
Sun May 3 16:27:06 UTC 2020


On Sun, 3 May 2020 15:57:04 +0100, you wrote:

>Hi All,
>
>I have just updated Xubutu on my server and backend computer.
>
>I also updated MythTV, from 0.29 to 0.31 (via an incremental 0.30 step). 
>This is because the idea of "Greatly improved Channel Scanning" was too 
>much to resist (I've not been able to use Live TV on Myth for months).
>
>After all of this, I've tried to run, "sudo mythtv-setup" and just ger 
>presented with a "Waiting for database" screen.
>
>My only lead on solving this is one of the files that the Xubuntu update 
>wanted to replace. It was mysqld.cnf
>
>I saved a copy of the changes between the old and new files (see below). 
>Does this help at all, or is it a blind alley?
>
>And if the text below is a blind alley, how can I check what's going on 
>with the database?
>
>If any log are needed, please let me know where/how to find them.
>
>Thanks,
>Damian

Is the "Waiting for database" message a GUI one from
mythtv-setup.real, or from the mythtv-setup wrapper script?  The
wrapper script has had significant changes in v31 so it can shut down
mythbackend in the current environment.  I would suggest manually
shutting down mythbackend (sudo systemctl stop mythtv-backend) and
then running mythtv-setup.real directly, to see if that works.

Also, mythtv-setup (and .real) should be run from a mythtv user,
rather than root.

Looking at the mysqld.cnf changes, I am not sure which of the two
diffed files is the one that is being loaded by MySQL or MariaDB.  If
it is the +++ one, then the bindaddress=127.0.0.1 line has been
uncommented, so it could be overriding your real bindaddress line in
another settings file.  Then your config.xml file might be using an
external IP address, and anything using that would not be able to
connect to the database.

BTW The config.xml file should be set connect using 127.0.0.1 or
localhost if it is on the same machine as the backend, as I believe
that using that setting tells MythTV programs to actually use a Unix
socket connection which is significantly faster and uses lower
resources than a TCP/IP connection to 127.0.0.1, which is in turn much
faster than using a TCP/IP connection to a real Ethernet port.


More information about the mythtv-users mailing list