Mailing List Archive

Ver 31 frontend cannot connect to the database
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 = 192.168.0.222
(the backend machine IP). The frontend config host is 192.168.0.222.

I know the ip addresses are good. I can load 192.168.0.222:6544 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
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
On Sun, Nov 22, 2020, 7:26 PM Mike Carron <jmcarron@gmx.com> 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 = 192.168.0.222 (the
> backend machine IP). The frontend config host is 192.168.0.222.
>
> I know the ip addresses are good. I can load 192.168.0.222:6544 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
>
Have you tried deleting the .mythtv/config.xml file on the FE? Then do a
search if the frontend does find it automatically

>
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
On 11/22/20 6:53 PM, James Abernathy wrote:
>
>
> On Sun, Nov 22, 2020, 7:26 PM Mike Carron <jmcarron@gmx.com
> <mailto:jmcarron@gmx.com>> 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 = 192.168.0.222 (the backend machine IP). The
> frontend config host is 192.168.0.222.
>
> I know the ip addresses are good. I can load 192.168.0.222:6544
> <http://192.168.0.222:6544> 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
>
> Have you tried deleting the .mythtv/config.xml file on the FE? Then do
> a search if the frontend does find it automatically
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
Have you made sure that your mysql is setup to connect over ethernet?

Specifically have you commented out the line that looks like this (mine
is debian buster and not xubuntu)

> mariadb.conf.d/50-server.cnf:# bind-address            = 127.0.0.1

Also, start up frontend on your backend machine and see if you can
connect after setup to IP of the backend machine (instead of localhost)


Ramesh

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
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 = 192.168.0.222
> (the backend machine IP). The frontend config host is 192.168.0.222.
>
> I know the ip addresses are good. I can load 192.168.0.222:6544 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 127.0.0.1 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 192.168.0.222,
nmap --reason -p 3306 192.168.0.222 (expect a syn-ack) and then:

mysql --host=192.168.0.222 --user=mythtv --password=<from config.xml> mythconverg

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
On 11/22/20 7:20 PM, Bill Meek wrote:
> On the backend's config.xml, always use localhost (or 127.0.0.1 if localhost
> can't be resolved). That causes a socket to be used.

Assuming the DB server is on the same host as the backend.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
backend's config.xml uses localhost.

status for mysql, mysqld and mariadb: active (running)

ping 192.168.0.222 works

nmap --reason -p 3306 192.168.0.222 produces:

PORT     STATE  SERVICE REASON
3306/tcp closed mysql   reset ttl 64
MAC Address: A8:5E:45:E3:5A:9F (Unknown)

mysql --host=192.168.0.222 --user=mythtv --password=<from config.xml>
mythconverg produces:

ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.222' (111)

This looks like the problem but I have no idea how to fix it.

mike

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 = 192.168.0.222
>> (the backend machine IP). The frontend config host is 192.168.0.222.
>>
>> I know the ip addresses are good. I can load 192.168.0.222:6544 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 127.0.0.1 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 192.168.0.222,
> nmap --reason -p 3306 192.168.0.222 (expect a syn-ack) and then:
>
> mysql --host=192.168.0.222 --user=mythtv --password=<from config.xml> mythconverg
>
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
It is.

On 11/22/20 6:37 PM, Bill Meek wrote:
> On 11/22/20 7:20 PM, Bill Meek wrote:
>> On the backend's config.xml, always use localhost (or 127.0.0.1 if localhost
>> can't be resolved). That causes a socket to be used.
> Assuming the DB server is on the same host as the backend.
>
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
Bind address 127.0.0.1 is commented out.

My backend machine is headless, no frontend.

On 11/22/20 5:00 PM, Ram Ramesh wrote:
> On 11/22/20 6:53 PM, James Abernathy wrote:
>>
>>
>> On Sun, Nov 22, 2020, 7:26 PM Mike Carron <jmcarron@gmx.com
>> <mailto:jmcarron@gmx.com>> 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 = 192.168.0.222 (the backend machine IP). The
>>     frontend config host is 192.168.0.222.
>>
>>     I know the ip addresses are good. I can load 192.168.0.222:6544
>>     <http://192.168.0.222:6544> 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
>>
>> Have you tried deleting the .mythtv/config.xml file on the FE? Then
>> do a search if the frontend does find it automatically
>>
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users@mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
> Have you made sure that your mysql is setup to connect over ethernet?
>
> Specifically have you commented out the line that looks like this
> (mine is debian buster and not xubuntu)
>
>> mariadb.conf.d/50-server.cnf:# bind-address            = 127.0.0.1
>
> Also, start up frontend on your backend machine and see if you can
> connect after setup to IP of the backend machine (instead of localhost)
>
>
> Ramesh
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
> 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 = 192.168.0.222
>>> (the backend machine IP). The frontend config host is 192.168.0.222.
>>>
>>> I know the ip addresses are good. I can load 192.168.0.222:6544 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 127.0.0.1 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 192.168.0.222,
>> nmap --reason -p 3306 192.168.0.222 (expect a syn-ack) and then:
>>
>>    mysql --host=192.168.0.222 --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 192.168.0.222 works
>
> nmap --reason -p 3306 192.168.0.222 produces:
>
> PORT STATE SERVICE REASON
> 3306/tcp closed mysql reset ttl 64
> MAC Address: A8:5E:45:E3:5A:9F (Unknown)
>
> mysql --host=192.168.0.222 --user=mythtv --password=<from config.xml>
> mythconverg produces:
>
> ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.222' (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.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
I didn't delete it, just renamed it oldmm.lll It doesn't make any
difference, mythfrontend goes directly to the waiting for database screen.

On 11/22/20 4:53 PM, James Abernathy wrote:
>
>
> On Sun, Nov 22, 2020, 7:26 PM Mike Carron <jmcarron@gmx.com
> <mailto:jmcarron@gmx.com>> 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 = 192.168.0.222 (the backend machine IP). The
> frontend config host is 192.168.0.222.
>
> I know the ip addresses are good. I can load 192.168.0.222:6544
> <http://192.168.0.222:6544> 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
>
> Have you tried deleting the .mythtv/config.xml file on the FE? Then do
> a search if the frontend does find it automatically
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
On 11/22/20 9:24 PM, Mike Carron wrote:
>
> I didn't delete it, just renamed it oldmm.lll It doesn't make any
> difference, mythfrontend goes directly to the waiting for database screen.
>
> On 11/22/20 4:53 PM, James Abernathy wrote:
>>
>>
>> On Sun, Nov 22, 2020, 7:26 PM Mike Carron <jmcarron@gmx.com
>> <mailto:jmcarron@gmx.com>> 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 = 192.168.0.222 (the backend machine IP). The
>> frontend config host is 192.168.0.222.
>>
>> I know the ip addresses are good. I can load 192.168.0.222:6544
>> <http://192.168.0.222:6544> 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
>>
>> Have you tried deleting the .mythtv/config.xml file on the FE? Then
>> do a search if the frontend does find it automatically
>>
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users@mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums:https://forum.mythtv.org
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

Does xubuntu install any firewall/iptables that could block access to
backend?

Ramesh
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
> On 23 Nov 2020, at 11:24 am, Mike Carron <jmcarron@gmx.com> wrote:
>
> I didn't delete it, just renamed it oldmm.lll It doesn't make any difference, mythfrontend goes directly to the waiting for database screen.
>
> On 11/22/20 4:53 PM, James Abernathy wrote:
>>
>>
>> On Sun, Nov 22, 2020, 7:26 PM Mike Carron <jmcarron@gmx.com> 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 = 192.168.0.222 (the backend machine IP). The frontend config host is 192.168.0.222.
>>
>> I know the ip addresses are good. I can load 192.168.0.222:6544 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
>>
>> Have you tried deleting the .mythtv/config.xml file on the FE? Then do a search if the frontend does find it automatically
>>

Mike everyone is talking though gloved hand

From frontend box
$ mysql -u mythtv -pmythtv -h dbbox mythconverg

If you can’t connect then fix this first (watch space after -p)

If you can connect, spelunk the password. The packagers for ubuntu in their infinite stupidity, sorry wisdom, have endowed myth with a bizare password so if you installed a frontend it gets a passord of ‘S0m3s111yrubbish” but the backend has a password of ‘0th3rs11yrubbish”.

the mysql line *needs* to succeed with the passwd mythtv is using. Unless you are living in a share-house with a bunch of holligans use ‘mythtv’ everywhere.

You may have to fiddle with the db. Find a mc.sql to guide you.
James
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
Please excuse my recent top posts. All of my other lists use top posting
and it is easy to forget this list bottom posts.

See below for response.

On 11/22/20 7:46 PM, Ram Ramesh wrote:
> On 11/22/20 9:24 PM, Mike Carron wrote:
>>
>> I didn't delete it, just renamed it oldmm.lll It doesn't make any
>> difference, mythfrontend goes directly to the waiting for database
>> screen.
>>
>> On 11/22/20 4:53 PM, James Abernathy wrote:
>>>
>>>
>>> On Sun, Nov 22, 2020, 7:26 PM Mike Carron <jmcarron@gmx.com
>>> <mailto:jmcarron@gmx.com>> 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 = 192.168.0.222 (the backend machine IP). The
>>>     frontend config host is 192.168.0.222.
>>>
>>>     I know the ip addresses are good. I can load 192.168.0.222:6544
>>>     <http://192.168.0.222:6544> 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
>>>
>>> Have you tried deleting the .mythtv/config.xml file on the FE? Then
>>> do a search if the frontend does find it automatically
>>>
> Does xubuntu install any firewall/iptables that could block access to
> backend?
>
> Ramesh
Mike: I don't think so. At least nothing that would block Firefox from
access to the backend.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
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 = 192.168.0.222
>>>> (the backend machine IP). The frontend config host is 192.168.0.222.
>>>>
>>>> I know the ip addresses are good. I can load 192.168.0.222:6544 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 127.0.0.1 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 192.168.0.222,
>>> nmap --reason -p 3306 192.168.0.222 (expect a syn-ack) and then:
>>>
>>>    mysql --host=192.168.0.222 --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 192.168.0.222 works
>>
>> nmap --reason -p 3306 192.168.0.222 produces:
>>
>> PORT STATE SERVICE REASON
>> 3306/tcp closed mysql reset ttl 64
>> MAC Address: A8:5E:45:E3:5A:9F (Unknown)
>>
>> mysql --host=192.168.0.222 --user=mythtv --password=<from config.xml>
>> mythconverg produces:
>>
>> ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.222' (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.

mike

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
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 = 192.168.0.222
>>>>> (the backend machine IP). The frontend config host is 192.168.0.222.
>>>>>
>>>>> I know the ip addresses are good. I can load 192.168.0.222:6544 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 127.0.0.1 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 192.168.0.222,
>>>> nmap --reason -p 3306 192.168.0.222 (expect a syn-ack) and then:
>>>>
>>>>     mysql --host=192.168.0.222 --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 192.168.0.222 works
>>>
>>> nmap --reason -p 3306 192.168.0.222 produces:
>>>
>>> PORT     STATE  SERVICE REASON
>>> 3306/tcp closed mysql   reset ttl 64
>>> MAC Address: A8:5E:45:E3:5A:9F (Unknown)
>>>
>>> mysql --host=192.168.0.222 --user=mythtv --password=<from config.xml>
>>> mythconverg produces:
>>>
>>> ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.222' (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).

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
On 11/22/20 7:51 PM, James Linder wrote:
>
>> On 23 Nov 2020, at 11:24 am, Mike Carron <jmcarron@gmx.com> wrote:
>>
>> I didn't delete it, just renamed it oldmm.lll It doesn't make any difference, mythfrontend goes directly to the waiting for database screen.
>>
>> On 11/22/20 4:53 PM, James Abernathy wrote:
>>>
>>> On Sun, Nov 22, 2020, 7:26 PM Mike Carron <jmcarron@gmx.com> 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 = 192.168.0.222 (the backend machine IP). The frontend config host is 192.168.0.222.
>>>
>>> I know the ip addresses are good. I can load 192.168.0.222:6544 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
>>>
>>> Have you tried deleting the .mythtv/config.xml file on the FE? Then do a search if the frontend does find it automatically
>>>
> Mike everyone is talking though gloved hand
>
> From frontend box
> $ mysql -u mythtv -pmythtv -h dbbox mythconverg
>
> If you can’t connect then fix this first (watch space after -p)
>
> If you can connect, spelunk the password. The packagers for ubuntu in their infinite stupidity, sorry wisdom, have endowed myth with a bizare password so if you installed a frontend it gets a passord of ‘S0m3s111yrubbish” but the backend has a password of ‘0th3rs11yrubbish”.
>
> the mysql line *needs* to succeed with the passwd mythtv is using. Unless you are living in a share-house with a bunch of holligans use ‘mythtv’ everywhere.
>
> You may have to fiddle with the db. Find a mc.sql to guide you.
> James

I can log in to mysql on the backend using mythtv and 'mysillyrubbish'
but when I use those same credentials in the database page in the
frontend setup they don't work. They do work when I log in to mythtv
using the backend address (192.168.0.xxx:6544) from my browser.

The mc.sql I found doesn't appear to be useful for my needs.



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
> On 23 Nov 2020, at 1:27 pm, Mike Carron <jmcarron@gmx.com> wrote:
>
>>> On 23 Nov 2020, at 11:24 am, Mike Carron <jmcarron@gmx.com> wrote:
>>>
>>> I didn't delete it, just renamed it oldmm.lll It doesn't make any difference, mythfrontend goes directly to the waiting for database screen.
>>>
>>> On 11/22/20 4:53 PM, James Abernathy wrote:
>>>>
>>>> On Sun, Nov 22, 2020, 7:26 PM Mike Carron <jmcarron@gmx.com> 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 = 192.168.0.222 (the backend machine IP). The frontend config host is 192.168.0.222.
>>>>
>>>> I know the ip addresses are good. I can load 192.168.0.222:6544 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
>>>>
>>>> Have you tried deleting the .mythtv/config.xml file on the FE? Then do a search if the frontend does find it automatically
>>>>
>> Mike everyone is talking though gloved hand
>>
>> From frontend box
>> $ mysql -u mythtv -pmythtv -h dbbox mythconverg
>>
>> If you can’t connect then fix this first (watch space after -p)
>>
>> If you can connect, spelunk the password. The packagers for ubuntu in their infinite stupidity, sorry wisdom, have endowed myth with a bizare password so if you installed a frontend it gets a passord of ‘S0m3s111yrubbish” but the backend has a password of ‘0th3rs11yrubbish”.
>>
>> the mysql line *needs* to succeed with the passwd mythtv is using. Unless you are living in a share-house with a bunch of holligans use ‘mythtv’ everywhere.
>>
>> You may have to fiddle with the db. Find a mc.sql to guide you.
>> James
>
> I can log in to mysql on the backend using mythtv and 'mysillyrubbish'
> but when I use those same credentials in the database page in the
> frontend setup they don't work. They do work when I log in to mythtv
> using the backend address (192.168.0.xxx:6544) from my browser.
>
> The mc.sql I found doesn't appear to be useful for my needs.
>


Clearly "something" is wrong.
The reference to mc.sql is on my system the backend talks to the db -h localhost.
The frontend uses 'mythfrontend.box' or '192.168.0.200' (what ever it was, you did post)

So from backendBox both -h localhost and -h 'IP' must work. If you use name rather than IP then some sort of DNS needs to be done (/etc/hosts, dnsmasq, bind etc)

Were it me I'd be spelunking hostname and passwords. For me I took mc.sql and duplcated 'localhost' and '192.168.0.%' (I use 5 not 0) ubuntu uses '%' as the wildcard. That did Not work for me I had to use '192.168.5.%'

Can you run a frontend on your backend. My backend is headless but nomachine is an easy test. SSH was unusable even for testing (openGL ?)
James
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
On 11/22/20 8:38 PM, Bill Meek wrote:
> 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 = 192.168.0.222
>>>>>> (the backend machine IP). The frontend config host is 192.168.0.222.
>>>>>>
>>>>>> I know the ip addresses are good. I can load 192.168.0.222:6544 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 127.0.0.1 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 192.168.0.222,
>>>>> nmap --reason -p 3306 192.168.0.222 (expect a syn-ack) and then:
>>>>>
>>>>>     mysql --host=192.168.0.222 --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 192.168.0.222 works
>>>>
>>>> nmap --reason -p 3306 192.168.0.222 produces:
>>>>
>>>> PORT     STATE  SERVICE REASON
>>>> 3306/tcp closed mysql   reset ttl 64
>>>> MAC Address: A8:5E:45:E3:5A:9F (Unknown)
>>>>
>>>> mysql --host=192.168.0.222 --user=mythtv --password=<from config.xml>
>>>> mythconverg produces:
>>>>
>>>> ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.222' (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).
>
Both nmap and mysql commands fail in the frontend. Both work in the
backend. Here is the result of nmap:

root@MythTVMBE:/# nmap --reason -p 3306 192.168.0.222
Starting Nmap 7.80 ( https://nmap.org ) at 2020-11-22 21:57 PST
Nmap scan report for MythTVMBE (192.168.0.222)
Host is up, received localhost-response (0.000064s latency).

PORT     STATE  SERVICE REASON
3306/tcp closed mysql   reset ttl 64

Nmap done: 1 IP address (1 host up) scanned in 0.16 seconds

If I'm reading this correctly my problem is that port 3306 is closed.
Port 3306 is what the frontend is trying to talk to. How do I open it?
I'm not a mysql expert and I'm way too old to become one.

mike

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
On 11/22/20 11:57 PM, James Linder wrote:
>
>
>> On 23 Nov 2020, at 1:27 pm, Mike Carron <jmcarron@gmx.com> wrote:
>>
>>>> On 23 Nov 2020, at 11:24 am, Mike Carron <jmcarron@gmx.com> wrote:
>>>>
>>>> I didn't delete it, just renamed it oldmm.lll It doesn't make any difference, mythfrontend goes directly to the waiting for database screen.
>>>>
>>>> On 11/22/20 4:53 PM, James Abernathy wrote:
>>>>>
>>>>> On Sun, Nov 22, 2020, 7:26 PM Mike Carron <jmcarron@gmx.com> 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 = 192.168.0.222 (the backend machine IP). The frontend config host is 192.168.0.222.
>>>>>
>>>>> I know the ip addresses are good. I can load 192.168.0.222:6544 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
>>>>>
>>>>> Have you tried deleting the .mythtv/config.xml file on the FE? Then do a search if the frontend does find it automatically
>>>>>
>>> Mike everyone is talking though gloved hand
>>>
>>> From frontend box
>>> $ mysql -u mythtv -pmythtv -h dbbox mythconverg
>>>
>>> If you can’t connect then fix this first (watch space after -p)
>>>
>>> If you can connect, spelunk the password. The packagers for ubuntu in their infinite stupidity, sorry wisdom, have endowed myth with a bizare password so if you installed a frontend it gets a passord of ‘S0m3s111yrubbish” but the backend has a password of ‘0th3rs11yrubbish”.
>>>
>>> the mysql line *needs* to succeed with the passwd mythtv is using. Unless you are living in a share-house with a bunch of holligans use ‘mythtv’ everywhere.
>>>
>>> You may have to fiddle with the db. Find a mc.sql to guide you.
>>> James
>>
>> I can log in to mysql on the backend using mythtv and 'mysillyrubbish'
>> but when I use those same credentials in the database page in the
>> frontend setup they don't work. They do work when I log in to mythtv
>> using the backend address (192.168.0.xxx:6544) from my browser.
>>
>> The mc.sql I found doesn't appear to be useful for my needs.
>>
>
>
> Clearly "something" is wrong.
> The reference to mc.sql is on my system the backend talks to the db -h localhost.
> The frontend uses 'mythfrontend.box' or '192.168.0.200' (what ever it was, you did post)
>
> So from backendBox both -h localhost and -h 'IP' must work. If you use name rather than IP then some sort of DNS needs to be done (/etc/hosts, dnsmasq, bind etc)
>
> Were it me I'd be spelunking hostname and passwords. For me I took mc.sql and duplcated 'localhost' and '192.168.0.%' (I use 5 not 0) ubuntu uses '%' as the wildcard. That did Not work for me I had to use '192.168.5.%'
>
> Can you run a frontend on your backend. My backend is headless but nomachine is an easy test. SSH was unusable even for testing (openGL ?)
> James

3 hours ago, the OP was asked to run two commands and reported:

nmap --reason -p 3306 192.168.0.222 produces:

PORT STATE SERVICE REASON
3306/tcp closed mysql reset ttl 64
MAC Address: A8:5E:45:E3:5A:9F (Unknown)

mysql --host=192.168.0.222 --user=mythtv --password=<from config.xml>
mythconverg produces:

ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.222' (111

So, it's not a password problem, at least then.

After a suggested bind-address change was done, we
only know that it continues to fail. I haven't seen
the output of the nmap and mysql commands.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
On 11/23/20 12:07 AM, Mike Carron wrote:
>
> On 11/22/20 8:38 PM, Bill Meek wrote:
>> 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 = 192.168.0.222
>>>>>>> (the backend machine IP). The frontend config host is 192.168.0.222.
>>>>>>>
>>>>>>> I know the ip addresses are good. I can load 192.168.0.222:6544 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 127.0.0.1 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 192.168.0.222,
>>>>>> nmap --reason -p 3306 192.168.0.222 (expect a syn-ack) and then:
>>>>>>
>>>>>>      mysql --host=192.168.0.222 --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 192.168.0.222 works
>>>>>
>>>>> nmap --reason -p 3306 192.168.0.222 produces:
>>>>>
>>>>> PORT     STATE  SERVICE REASON
>>>>> 3306/tcp closed mysql   reset ttl 64
>>>>> MAC Address: A8:5E:45:E3:5A:9F (Unknown)
>>>>>
>>>>> mysql --host=192.168.0.222 --user=mythtv --password=<from config.xml>
>>>>> mythconverg produces:
>>>>>
>>>>> ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.222' (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).
>>
> Both nmap and mysql commands fail in the frontend. Both work in the
> backend. Here is the result of nmap:
>
> root@MythTVMBE:/# nmap --reason -p 3306 192.168.0.222
> Starting Nmap 7.80 ( https://nmap.org ) at 2020-11-22 21:57 PST
> Nmap scan report for MythTVMBE (192.168.0.222)
> Host is up, received localhost-response (0.000064s latency).
>
> PORT     STATE  SERVICE REASON
> 3306/tcp closed mysql   reset ttl 64
>
> Nmap done: 1 IP address (1 host up) scanned in 0.16 seconds
>
> If I'm reading this correctly my problem is that port 3306 is closed.
> Port 3306 is what the frontend is trying to talk to. How do I open it?
> I'm not a mysql expert and I'm way too old to become one.

Unfortunately, the bind-address solution is my best shot or at least my 1st.

Lets see the command and output from this: grep --recursive bind.address /etc/mysql

Then the command and output from this: tail -5 /etc/mysql/my.cnf

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
On 11/22/20 10:40 PM, Bill Meek wrote:
> On 11/23/20 12:07 AM, Mike Carron wrote:
>> On 11/22/20 8:38 PM, Bill Meek wrote:
>>> 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 = 192.168.0.222
>>>>>>>> (the backend machine IP). The frontend config host is 192.168.0.222.
>>>>>>>>
>>>>>>>> I know the ip addresses are good. I can load 192.168.0.222:6544 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 127.0.0.1 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 192.168.0.222,
>>>>>>> nmap --reason -p 3306 192.168.0.222 (expect a syn-ack) and then:
>>>>>>>
>>>>>>>      mysql --host=192.168.0.222 --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 192.168.0.222 works
>>>>>>
>>>>>> nmap --reason -p 3306 192.168.0.222 produces:
>>>>>>
>>>>>> PORT     STATE  SERVICE REASON
>>>>>> 3306/tcp closed mysql   reset ttl 64
>>>>>> MAC Address: A8:5E:45:E3:5A:9F (Unknown)
>>>>>>
>>>>>> mysql --host=192.168.0.222 --user=mythtv --password=<from config.xml>
>>>>>> mythconverg produces:
>>>>>>
>>>>>> ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.222' (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).
>>>
>> Both nmap and mysql commands fail in the frontend. Both work in the
>> backend. Here is the result of nmap:
>>
>> root@MythTVMBE:/# nmap --reason -p 3306 192.168.0.222
>> Starting Nmap 7.80 ( https://nmap.org ) at 2020-11-22 21:57 PST
>> Nmap scan report for MythTVMBE (192.168.0.222)
>> Host is up, received localhost-response (0.000064s latency).
>>
>> PORT     STATE  SERVICE REASON
>> 3306/tcp closed mysql   reset ttl 64
>>
>> Nmap done: 1 IP address (1 host up) scanned in 0.16 seconds
>>
>> If I'm reading this correctly my problem is that port 3306 is closed.
>> Port 3306 is what the frontend is trying to talk to. How do I open it?
>> I'm not a mysql expert and I'm way too old to become one.
> Unfortunately, the bind-address solution is my best shot or at least my 1st.
>
> Lets see the command and output from this: grep --recursive bind.address /etc/mysql
>
> Then the command and output from this: tail -5 /etc/mysql/my.cnf

These commands are run on the backend:

root@MythTVMBE:/# grep --recursive bind.address /etc/mysql
/etc/mysql/mariadb.conf.d/50-server.cnf:bind-address            = 127.0.0.1
/etc/mysql/conf.d/mythtv.cnf:bind-address=::

root@MythTVMBE:/# tail -5 /etc/mysql/my.cnf
[client-server]

# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/

For what it's worth, etc/mysql/conf.d/ is where the bind address can be
found. /etc/mysql/mariadb.conf.d does not contain any bind addresses
that I could find.

mike

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
On Sun, 22 Nov 2020 22:52:01 -0800, you wrote:

>
>On 11/22/20 10:40 PM, Bill Meek wrote:
>> On 11/23/20 12:07 AM, Mike Carron wrote:
>>> On 11/22/20 8:38 PM, Bill Meek wrote:
>>>> 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 = 192.168.0.222
>>>>>>>>> (the backend machine IP). The frontend config host is 192.168.0.222.
>>>>>>>>>
>>>>>>>>> I know the ip addresses are good. I can load 192.168.0.222:6544 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 127.0.0.1 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 192.168.0.222,
>>>>>>>> nmap --reason -p 3306 192.168.0.222 (expect a syn-ack) and then:
>>>>>>>>
>>>>>>>> ???? mysql --host=192.168.0.222 --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 192.168.0.222 works
>>>>>>>
>>>>>>> nmap --reason -p 3306 192.168.0.222 produces:
>>>>>>>
>>>>>>> PORT???? STATE? SERVICE REASON
>>>>>>> 3306/tcp closed mysql?? reset ttl 64
>>>>>>> MAC Address: A8:5E:45:E3:5A:9F (Unknown)
>>>>>>>
>>>>>>> mysql --host=192.168.0.222 --user=mythtv --password=<from config.xml>
>>>>>>> mythconverg produces:
>>>>>>>
>>>>>>> ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.222' (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).
>>>>
>>> Both nmap and mysql commands fail in the frontend. Both work in the
>>> backend. Here is the result of nmap:
>>>
>>> root@MythTVMBE:/# nmap --reason -p 3306 192.168.0.222
>>> Starting Nmap 7.80 ( https://nmap.org ) at 2020-11-22 21:57 PST
>>> Nmap scan report for MythTVMBE (192.168.0.222)
>>> Host is up, received localhost-response (0.000064s latency).
>>>
>>> PORT???? STATE? SERVICE REASON
>>> 3306/tcp closed mysql?? reset ttl 64
>>>
>>> Nmap done: 1 IP address (1 host up) scanned in 0.16 seconds
>>>
>>> If I'm reading this correctly my problem is that port 3306 is closed.
>>> Port 3306 is what the frontend is trying to talk to. How do I open it?
>>> I'm not a mysql expert and I'm way too old to become one.
>> Unfortunately, the bind-address solution is my best shot or at least my 1st.
>>
>> Lets see the command and output from this: grep --recursive bind.address /etc/mysql
>>
>> Then the command and output from this: tail -5 /etc/mysql/my.cnf
>
>These commands are run on the backend:
>
>root@MythTVMBE:/# grep --recursive bind.address /etc/mysql
>/etc/mysql/mariadb.conf.d/50-server.cnf:bind-address??????????? = 127.0.0.1
>/etc/mysql/conf.d/mythtv.cnf:bind-address=::
>
>root@MythTVMBE:/# tail -5 /etc/mysql/my.cnf
>[client-server]
>
># Import all .cnf files from configuration directory
>!includedir /etc/mysql/conf.d/
>!includedir /etc/mysql/mariadb.conf.d/
>
>For what it's worth, etc/mysql/conf.d/ is where the bind address can be
>found. /etc/mysql/mariadb.conf.d does not contain any bind addresses
>that I could find.
>
>mike

Ok, that is the problem then. The "bind-address=127.0.0.1" is the one
being used by MariaDB, instead of the "bind-address=::", because of
the order it reads the config files. The last one read is the one
that gets used. So the simple thing to do is just to comment out the
"bind-address=127.0.0.1" line in the
/etc/mysql/mariadb.conf.d/50-server.cnf file by putting a # at the
start of the line. Then restart MariaDB:

sudo systemctl restart mariadb
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
Mike I said

> From frontend box
> $ mysql -u mythtv -pmythtv -h dbbox mythconverg
>
> If you can’t connect then fix this first (watch space after -p)

I thought you replied

> I can log in to mysql on the backend using mythtv and 'mysillyrubbish'
> but when I use those same credentials in the database page in the
> frontend setup they don't work. They do work when I log in to mythtv
> using the backend address (192.168.0.xxx:6544) from my browser.
>
> The mc.sql I found doesn't appear to be useful for my needs.

In which case

> Ok, that is the problem then. The "bind-address=127.0.0.1" is the one
> being used by MariaDB, instead of the "bind-address=::", because of
> the order it reads the config files. The last one read is the one
> that gets used. So the simple thing to do is just to comment out the
> "bind-address=127.0.0.1" line in the
> /etc/mysql/mariadb.conf.d/50-server.cnf file by putting a # at the
> start of the line. Then restart MariaDB:
>
> sudo systemctl restart mariadb

Is irrelevant.

James
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
On 11/23/20 2:22 AM, Stephen Worthington wrote:
> On Sun, 22 Nov 2020 22:52:01 -0800, you wrote:
>
>>
>> On 11/22/20 10:40 PM, Bill Meek wrote:
>>> On 11/23/20 12:07 AM, Mike Carron wrote:
>>>> On 11/22/20 8:38 PM, Bill Meek wrote:
>>>>> 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 = 192.168.0.222
>>>>>>>>>> (the backend machine IP). The frontend config host is 192.168.0.222.
>>>>>>>>>>
>>>>>>>>>> I know the ip addresses are good. I can load 192.168.0.222:6544 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 127.0.0.1 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 192.168.0.222,
>>>>>>>>> nmap --reason -p 3306 192.168.0.222 (expect a syn-ack) and then:
>>>>>>>>>
>>>>>>>>>      mysql --host=192.168.0.222 --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 192.168.0.222 works
>>>>>>>>
>>>>>>>> nmap --reason -p 3306 192.168.0.222 produces:
>>>>>>>>
>>>>>>>> PORT     STATE  SERVICE REASON
>>>>>>>> 3306/tcp closed mysql   reset ttl 64
>>>>>>>> MAC Address: A8:5E:45:E3:5A:9F (Unknown)
>>>>>>>>
>>>>>>>> mysql --host=192.168.0.222 --user=mythtv --password=<from config.xml>
>>>>>>>> mythconverg produces:
>>>>>>>>
>>>>>>>> ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.222' (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).
>>>>>
>>>> Both nmap and mysql commands fail in the frontend. Both work in the
>>>> backend. Here is the result of nmap:
>>>>
>>>> root@MythTVMBE:/# nmap --reason -p 3306 192.168.0.222
>>>> Starting Nmap 7.80 ( https://nmap.org ) at 2020-11-22 21:57 PST
>>>> Nmap scan report for MythTVMBE (192.168.0.222)
>>>> Host is up, received localhost-response (0.000064s latency).
>>>>
>>>> PORT     STATE  SERVICE REASON
>>>> 3306/tcp closed mysql   reset ttl 64
>>>>
>>>> Nmap done: 1 IP address (1 host up) scanned in 0.16 seconds
>>>>
>>>> If I'm reading this correctly my problem is that port 3306 is closed.
>>>> Port 3306 is what the frontend is trying to talk to. How do I open it?
>>>> I'm not a mysql expert and I'm way too old to become one.
>>> Unfortunately, the bind-address solution is my best shot or at least my 1st.
>>>
>>> Lets see the command and output from this: grep --recursive bind.address /etc/mysql
>>>
>>> Then the command and output from this: tail -5 /etc/mysql/my.cnf
>>
>> These commands are run on the backend:
>>
>> root@MythTVMBE:/# grep --recursive bind.address /etc/mysql
>> /etc/mysql/mariadb.conf.d/50-server.cnf:bind-address            = 127.0.0.1
>> /etc/mysql/conf.d/mythtv.cnf:bind-address=::
>>
>> root@MythTVMBE:/# tail -5 /etc/mysql/my.cnf
>> [client-server]
>>
>> # Import all .cnf files from configuration directory
>> !includedir /etc/mysql/conf.d/
>> !includedir /etc/mysql/mariadb.conf.d/
>>
>> For what it's worth, etc/mysql/conf.d/ is where the bind address can be
>> found. /etc/mysql/mariadb.conf.d does not contain any bind addresses
>> that I could find.
>>
>> mike
>
> Ok, that is the problem then. The "bind-address=127.0.0.1" is the one
> being used by MariaDB, instead of the "bind-address=::", because of
> the order it reads the config files. The last one read is the one
> that gets used. So the simple thing to do is just to comment out the
> "bind-address=127.0.0.1" line in the
> /etc/mysql/mariadb.conf.d/50-server.cnf file by putting a # at the
> start of the line. Then restart MariaDB:
>
> sudo systemctl restart mariadb

At least my /etc/mysql/mariadb.conf.d/50-server.cnf, appears to
be one that would be released by a package manager and changes to
it could be overwritten by updates/upgrades.

I'd move the mythtv.cnf file to /etc/mysql/mariadb.conf.d to
prevent future surprises.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
On 11/23/20 7:13 AM, Bill Meek wrote:
> On 11/23/20 2:22 AM, Stephen Worthington wrote:
>> On Sun, 22 Nov 2020 22:52:01 -0800, you wrote:
>>
>>> On 11/22/20 10:40 PM, Bill Meek wrote:
>>>> On 11/23/20 12:07 AM, Mike Carron wrote:
>>>>> On 11/22/20 8:38 PM, Bill Meek wrote:
>>>>>> 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 = 192.168.0.222
>>>>>>>>>>> (the backend machine IP). The frontend config host is 192.168.0.222.
>>>>>>>>>>>
>>>>>>>>>>> I know the ip addresses are good. I can load 192.168.0.222:6544 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 127.0.0.1 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 192.168.0.222,
>>>>>>>>>> nmap --reason -p 3306 192.168.0.222 (expect a syn-ack) and then:
>>>>>>>>>>
>>>>>>>>>>      mysql --host=192.168.0.222 --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 192.168.0.222 works
>>>>>>>>>
>>>>>>>>> nmap --reason -p 3306 192.168.0.222 produces:
>>>>>>>>>
>>>>>>>>> PORT     STATE  SERVICE REASON
>>>>>>>>> 3306/tcp closed mysql   reset ttl 64
>>>>>>>>> MAC Address: A8:5E:45:E3:5A:9F (Unknown)
>>>>>>>>>
>>>>>>>>> mysql --host=192.168.0.222 --user=mythtv --password=<from config.xml>
>>>>>>>>> mythconverg produces:
>>>>>>>>>
>>>>>>>>> ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.222' (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).
>>>>>>
>>>>> Both nmap and mysql commands fail in the frontend. Both work in the
>>>>> backend. Here is the result of nmap:
>>>>>
>>>>> root@MythTVMBE:/# nmap --reason -p 3306 192.168.0.222
>>>>> Starting Nmap 7.80 ( https://nmap.org ) at 2020-11-22 21:57 PST
>>>>> Nmap scan report for MythTVMBE (192.168.0.222)
>>>>> Host is up, received localhost-response (0.000064s latency).
>>>>>
>>>>> PORT     STATE  SERVICE REASON
>>>>> 3306/tcp closed mysql   reset ttl 64
>>>>>
>>>>> Nmap done: 1 IP address (1 host up) scanned in 0.16 seconds
>>>>>
>>>>> If I'm reading this correctly my problem is that port 3306 is closed.
>>>>> Port 3306 is what the frontend is trying to talk to. How do I open it?
>>>>> I'm not a mysql expert and I'm way too old to become one.
>>>> Unfortunately, the bind-address solution is my best shot or at least my 1st.
>>>>
>>>> Lets see the command and output from this: grep --recursive bind.address /etc/mysql
>>>>
>>>> Then the command and output from this: tail -5 /etc/mysql/my.cnf
>>> These commands are run on the backend:
>>>
>>> root@MythTVMBE:/# grep --recursive bind.address /etc/mysql
>>> /etc/mysql/mariadb.conf.d/50-server.cnf:bind-address            = 127.0.0.1
>>> /etc/mysql/conf.d/mythtv.cnf:bind-address=::
>>>
>>> root@MythTVMBE:/# tail -5 /etc/mysql/my.cnf
>>> [client-server]
>>>
>>> # Import all .cnf files from configuration directory
>>> !includedir /etc/mysql/conf.d/
>>> !includedir /etc/mysql/mariadb.conf.d/
>>>
>>> For what it's worth, etc/mysql/conf.d/ is where the bind address can be
>>> found. /etc/mysql/mariadb.conf.d does not contain any bind addresses
>>> that I could find.
>>>
>>> mike
>> Ok, that is the problem then. The "bind-address=127.0.0.1" is the one
>> being used by MariaDB, instead of the "bind-address=::", because of
>> the order it reads the config files. The last one read is the one
>> that gets used. So the simple thing to do is just to comment out the
>> "bind-address=127.0.0.1" line in the
>> /etc/mysql/mariadb.conf.d/50-server.cnf file by putting a # at the
>> start of the line. Then restart MariaDB:
>>
>> sudo systemctl restart mariadb
> At least my /etc/mysql/mariadb.conf.d/50-server.cnf, appears to
> be one that would be released by a package manager and changes to
> it could be overwritten by updates/upgrades.
>
> I'd move the mythtv.cnf file to /etc/mysql/mariadb.conf.d to
> prevent future surprises.
>
Thanks Bill,

how about permissions? mythtv.cnf is 644 while everything else in that
directory is 755.

mike

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org

1 2  View All