[mythtv-users] Ver 31 frontend cannot connect to the database

Bill Meek keemllib at gmail.com
Mon Nov 23 04:38:34 UTC 2020

On 11/22/20 10:27 PM, Mike Carron wrote:
> On 11/22/20 7:14 PM, Bill Meek wrote:
>>> On 11/22/20 5:20 PM, Bill Meek wrote:
>>>> On 11/22/20 6:23 PM, Mike Carron wrote:
>>>>> My backend host recently failed badly enough that I was not able to
>>>>> salvage anything so I replaced the hardware and installed a new Ubuntu
>>>>> 20.04 and a new v31 mythtv-backend-master with xmltv.
>>>>> I then upgraded a remote frontend (Ubuntu 18.04) from MythTV 30 to 31
>>>>> but that frontend will not connect to the database.
>>>>> I've checked and rechecked the frontend setup screen and everything is
>>>>> correct. The config.xml files for both look like they should work. I've
>>>>> tried the backend config with </host> = localhost and =
>>>>> (the backend machine IP). The frontend config host is
>>>>> I know the ip addresses are good. I can load into the
>>>>> address line of the Firefox on the frontend machine and it finds the
>>>>> database immediately.
>>>>> I'm no doubt missing something obvious but I can't find it. It seems
>>>>> like I have worn out 2 search engines trying.
>>>>> Suggestions?
>>>>> mike
>>>> On the backend's config.xml, always use localhost (or if localhost
>>>> can't be resolved). That causes a socket to be used.
>>>> See if mysql is running on the backend: systemctl status mysql mysqld mariadb
>>>> Probably is if the backend is running OK.
>>>> One of the above ^^^ should be running. All three will work if
>>>> using mariadb and the Alias= lines in the service are setup.
>>>> On the frontend, the following three must work: ping,
>>>> nmap --reason -p 3306 (expect a syn-ack) and then:
>>>>     mysql --host= --user=mythtv --password=<from config.xml> mythconverg
>> On 11/22/20 8:50 PM, Mike Carron wrote:
>>> backend's config.xml uses localhost.
>>> status for mysql, mysqld and mariadb: active (running)
>>> ping works
>>> nmap --reason -p 3306 produces:
>>> 3306/tcp closed mysql   reset ttl 64
>>> MAC Address: A8:5E:45:E3:5A:9F (Unknown)
>>> mysql --host= --user=mythtv --password=<from config.xml>
>>> mythconverg produces:
>>> ERROR 2003 (HY000): Can't connect to MySQL server on '' (111)
>>> This looks like the problem but I have no idea how to fix it.
>> See the answer from Ramesh.
>> grep --recursive bind.address /etc/mysql
>> My choice, which allows connections from any host
>> including IPv6:
>> $ cat /etc/mysql/mariadb.conf.d/mythtv.cnf
>> [mysqld]
>> bind_address=::
>> Restart mysql for it to take affect.
> On my backend /etc/mysql/mariadb.conf.d contains: 50-client.cnf
> 50-mysql-clients.cnf  50-mysqld_safe.cnf  50-server.cnf.
> mythtv.cnf is in /etc/mysql/conf.d/,  the contents are:
> [mysqld]
> bind-address=::
> max_connections=100
> I restarted mysql. Nothing changed.

Need to be careful here. Try this:  tail -5 /etc/mysql/my.cnf

That tells you the order that the sub-directories are included in.

Any instance of bind_address AFTER the one you set will override it.

Do the grep above to see if there are any other bind-addresses. Don't
change them, just be sure mythtv.cnf is read alphabetically after
everything else.

Also, "Nothing changed" isn't clear enough. Did the nmap and mysql
commands fail exactly the same way. You could have moved on from
a connect failure to a password problem (for example).


More information about the mythtv-users mailing list