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
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
On 11/23/20 7:13 AM, Bill Meek wrote:

|

snip

|

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.

I've gone over everything and I have to conclude that port 3306 on the
backend being closed is the culprit. Since mythfrontend wants to use
port 3306 to communicate with the backend I'm not going to get anywhere
until port 3306 is opened. Unfortunately I do not know how to do that.

How do I open port 3306?

mike
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
Was the account@IP given access in the database itself? It could be that
it's refusing connection on start, so not binding to the port.

On Mon, Nov 23, 2020, 7:59 PM Mike Carron <jmcarron@gmx.com> wrote:

>
> On 11/23/20 7:13 AM, Bill Meek wrote:
>
> |
>
> snip
>
> |
>
> 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.
>
> I've gone over everything and I have to conclude that port 3306 on the
> backend being closed is the culprit. Since mythfrontend wants to use port
> 3306 to communicate with the backend I'm not going to get anywhere until
> port 3306 is opened. Unfortunately I do not know how to do that.
>
> How do I open port 3306?
>
> 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/23/20 6:57 PM, Mike Carron wrote:
>
>
> I've gone over everything and I have to conclude that port 3306 on the
> backend being closed is the culprit. Since mythfrontend wants to use
> port 3306 to communicate with the backend I'm not going to get anywhere
> until port 3306 is opened. Unfortunately I do not know how to do that.
>
> How do I open port 3306?

The SQL server will open the port. The default is 3306.

Do this, command and output please:

sudo grep --recursive --ignore "port.*=" /etc/mysql

I can't agree with your assumption though. Need the fresh
command and output of this:

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

The reset time to live output of nmap is unusual:

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

I'm wondering if the SQL server is failing and restarting. Full output of

systemctl status mysql # or mysqld or mariadb, I forgot which works for you

--
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 Mon, 23 Nov 2020 16:57:05 -0800, you wrote:

>
>On 11/23/20 7:13 AM, Bill Meek wrote:
>
> |
>
> snip
>
> |
>
> 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.
>
>I've gone over everything and I have to conclude that port 3306 on the
>backend being closed is the culprit. Since mythfrontend wants to use
>port 3306 to communicate with the backend I'm not going to get anywhere
>until port 3306 is opened. Unfortunately I do not know how to do that.
>
>How do I open port 3306?
>
>mike

As I said, fix the MariaDB bind-address. Port 3306 is the port for
MariaDB, not MythTV. MariaDB is still binding to 3306 only on
localhost. It needs to bind 3306 on all IP addresses.
_______________________________________________
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 5:25 PM, Bill Meek wrote:
> On 11/23/20 6:57 PM, Mike Carron wrote:
>>
>> I've gone over everything and I have to conclude that port 3306 on the
>> backend being closed is the culprit. Since mythfrontend wants to use
>> port 3306 to communicate with the backend I'm not going to get anywhere
>> until port 3306 is opened. Unfortunately I do not know how to do that.
>>
>> How do I open port 3306?
> The SQL server will open the port. The default is 3306.
>
> Do this, command and output please:
>
> sudo grep --recursive --ignore "port.*=" /etc/mysql
> [sudo] password for mike:
> /etc/mysql/mariadb.conf.d/50-server.cnf:#port = 3306

> can't agree with your assumption though. Need the fresh
> command and output of this:
>
> mysql --host=192.168.0.222 --user=mythtv --password=<from config.xml>
mysql --host=192.168.0.222 --user=mythtv --password=<from config.xml>
ERROR 2002 (HY000): Can't connect to MySQL server on '192.168.0.222' (115)
> The reset time to live output of nmap is unusual:
>
> PORT STATE SERVICE REASON
> 3306/tcp closed mysql reset ttl 64
sudo nmap --reason -p 3306 192.168.0.222
[sudo] password for mike:

Starting Nmap 7.60 ( https://nmap.org ) at 2020-11-23 19:28 PST
Nmap scan report for 192.168.0.222
Host is up, received arp-response (0.00049s latency).

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

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

** MAC address belongs to 192.168.0.222

>
> I'm wondering if the SQL server is failing and restarting. Full output of
>
> systemctl status mysql # or mysqld or mariadb, I forgot which works for you
>
systemctl status mysql
? mariadb.service - MariaDB 10.3.25 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled;
vendor preset: enabled)
     Active: active (running) since Sun 2020-11-22 19:45:11 PST; 23h ago
       Docs: man:mysqld(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 3004 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root
-d /var/run/mysqld (code=exited, status=0/SUCCESS)
    Process: 3008 ExecStartPre=/bin/sh -c systemctl unset-environment
_WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 3017 ExecStartPre=/bin/sh -c [ ! -e
/usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..;
/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment
_WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
    Process: 3113 ExecStartPost=/bin/sh -c systemctl unset-environment
_WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 3115 ExecStartPost=/etc/mysql/debian-start (code=exited,
status=0/SUCCESS)
   Main PID: 3081 (mysqld)
     Status: "Taking your SQL requests now..."
      Tasks: 36 (limit: 18748)
     Memory: 252.4M
     CGroup: /system.slice/mariadb.service
             ??3081 /usr/sbin/mysqld

Nov 22 19:45:10 MythTVMBE systemd[1]: Starting MariaDB 10.3.25 database
server...
Nov 22 19:45:11 MythTVMBE mysqld[3081]: 2020-11-22 19:45:11 0 [Note]
/usr/sbin/mysqld (mysqld 10.3.25-MariaDB-0ubuntu0.20.04.1) starting as
process 3081 ...
Nov 22 19:45:11 MythTVMBE mysqld[3081]: 2020-11-22 19:45:11 0 [Warning]
Could not increase number of max_open_files to more than 16384 (request:
32139)
Nov 22 19:45:11 MythTVMBE systemd[1]: Started MariaDB 10.3.25 database
server.
Nov 22 19:45:11 MythTVMBE /etc/mysql/debian-start[3120]: Looking for
'mysql' as: /usr/bin/mysql
Nov 22 19:45:11 MythTVMBE /etc/mysql/debian-start[3120]: Looking for
'mysqlcheck' as: /usr/bin/mysqlcheck
Nov 22 19:45:11 MythTVMBE /etc/mysql/debian-start[3120]: This
installation of MySQL is already upgraded to 10.3.25-MariaDB, use
--force if you still need to run mysql_upgrade

Nov 22 19:45:11 MythTVMBE /etc/mysql/debian-start[3133]: Triggering
myisam-recover for all MyISAM tables and aria-recover for all Aria tables

Let me know if anything else might be useful.

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/23/20 6:09 PM, Stephen Worthington wrote:
> On Mon, 23 Nov 2020 16:57:05 -0800, you wrote:
>
>> On 11/23/20 7:13 AM, Bill Meek wrote:
>>
>> |
>>
>> snip
>>
>> |
>>
>> 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.
>>
>> I've gone over everything and I have to conclude that port 3306 on the
>> backend being closed is the culprit. Since mythfrontend wants to use
>> port 3306 to communicate with the backend I'm not going to get anywhere
>> until port 3306 is opened. Unfortunately I do not know how to do that.
>>
>> How do I open port 3306?
>>
>> mike
> As I said, fix the MariaDB bind-address. Port 3306 is the port for
> MariaDB, not MythTV. MariaDB is still binding to 3306 only on
> localhost. It needs to bind 3306 on all IP addresses.

How do I do that?

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 Mon, 23 Nov 2020 19:37:37 -0800, you wrote:

>
>On 11/23/20 6:09 PM, Stephen Worthington wrote:
>> On Mon, 23 Nov 2020 16:57:05 -0800, you wrote:
>>
>>> On 11/23/20 7:13 AM, Bill Meek wrote:
>>>
>>> |
>>>
>>> snip
>>>
>>> |
>>>
>>> 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.
>>>
>>> I've gone over everything and I have to conclude that port 3306 on the
>>> backend being closed is the culprit. Since mythfrontend wants to use
>>> port 3306 to communicate with the backend I'm not going to get anywhere
>>> until port 3306 is opened. Unfortunately I do not know how to do that.
>>>
>>> How do I open port 3306?
>>>
>>> mike
>> As I said, fix the MariaDB bind-address. Port 3306 is the port for
>> MariaDB, not MythTV. MariaDB is still binding to 3306 only on
>> localhost. It needs to bind 3306 on all IP addresses.
>
>How do I do that?
>
>mike

As per my previous post:

In your MariaDB settings, 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 ]
On 11/24/20 3:07 AM, Stephen Worthington wrote:
> On Mon, 23 Nov 2020 19:37:37 -0800, you wrote:
>
>> On 11/23/20 6:09 PM, Stephen Worthington wrote:
>>> On Mon, 23 Nov 2020 16:57:05 -0800, you wrote:
>>>
>>>> On 11/23/20 7:13 AM, Bill Meek wrote:
>>>>
>>>> |
>>>>
>>>> snip
>>>>
>>>> |
>>>>
>>>> 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.
>>>>
>>>> I've gone over everything and I have to conclude that port 3306 on the
>>>> backend being closed is the culprit. Since mythfrontend wants to use
>>>> port 3306 to communicate with the backend I'm not going to get anywhere
>>>> until port 3306 is opened. Unfortunately I do not know how to do that.
>>>>
>>>> How do I open port 3306?
>>>>
>>>> mike
>>> As I said, fix the MariaDB bind-address. Port 3306 is the port for
>>> MariaDB, not MythTV. MariaDB is still binding to 3306 only on
>>> localhost. It needs to bind 3306 on all IP addresses.
>> ma
>> How do I do that?/
>>
>> mike
> As per my previous post:
>
> In your MariaDB settings, 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
> _______________________________________________

Did that already.

I did some more checking and found that "port = 3306" was commented out
in /etc/mysql/mariadb.conf.d/50-server.cnf. I uncommented it and now I
no longer see the "ERROR 2002 (HY000): Can't connect to MySQL server on
'192.168.0.222' (115)" message.

_______________________________________________
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 Tue, Nov 24, 2020 at 10:24 AM Mike Carron <jmcarron@gmx.com> wrote:

>
> On 11/24/20 3:07 AM, Stephen Worthington wrote:
> > On Mon, 23 Nov 2020 19:37:37 -0800, you wrote:
> >
> >> On 11/23/20 6:09 PM, Stephen Worthington wrote:
> >>> On Mon, 23 Nov 2020 16:57:05 -0800, you wrote:
> >>>
> >>>> On 11/23/20 7:13 AM, Bill Meek wrote:
> >>>>
> >>>> |
> >>>>
> >>>> snip
> >>>>
> >>>> |
> >>>>
> >>>> 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.
> >>>>
> >>>> I've gone over everything and I have to conclude that port 3306 on the
> >>>> backend being closed is the culprit. Since mythfrontend wants to use
> >>>> port 3306 to communicate with the backend I'm not going to get
> anywhere
> >>>> until port 3306 is opened. Unfortunately I do not know how to do that.
> >>>>
> >>>> How do I open port 3306?
> >>>>
> >>>> mike
> >>> As I said, fix the MariaDB bind-address. Port 3306 is the port for
> >>> MariaDB, not MythTV. MariaDB is still binding to 3306 only on
> >>> localhost. It needs to bind 3306 on all IP addresses.
> >> ma
> >> How do I do that?/
> >>
> >> mike
> > As per my previous post:
> >
> > In your MariaDB settings, 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
> > _______________________________________________
>
> Did that already.
>
> I did some more checking and found that "port = 3306" was commented out
> in /etc/mysql/mariadb.conf.d/50-server.cnf. I uncommented it and now I
> no longer see the "ERROR 2002 (HY000): Can't connect to MySQL server on
> '192.168.0.222' (115)" message.
>


`sudo netstat -peanut |grep LIST |grep -v 127.0.0.1 |grep 3306`

will tell you easily if MySQL (MariaDB) has a socket open on port 3306. If
that command returns a value, you can stop fiddling with the config files
and move on to the firewall or user privileges.
Re: Ver 31 frontend cannot connect to the database [ In reply to ]
On 11/24/20 10:22 AM, Mike Carron wrote:
>
> On 11/24/20 3:07 AM, Stephen Worthington wrote:
>> On Mon, 23 Nov 2020 19:37:37 -0800, you wrote:
>>
>>> On 11/23/20 6:09 PM, Stephen Worthington wrote:
>>>> On Mon, 23 Nov 2020 16:57:05 -0800, you wrote:
>>>>
>>>>> On 11/23/20 7:13 AM, Bill Meek wrote:
>>>>>
>>>>>      |
>>>>>
>>>>>      snip
>>>>>
>>>>>      |
>>>>>
>>>>>      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.
>>>>>
>>>>> I've gone over everything and I have to conclude that port 3306 on the
>>>>> backend being closed is the culprit. Since mythfrontend wants to use
>>>>> port 3306 to communicate with the backend I'm not going to get anywhere
>>>>> until port 3306 is opened. Unfortunately I do not know how to do that.
>>>>>
>>>>> How do I open port 3306?
>>>>>
>>>>> mike
>>>> As I said, fix the MariaDB bind-address.  Port 3306 is the port for
>>>> MariaDB, not MythTV.  MariaDB is still binding to 3306 only on
>>>> localhost.  It needs to bind 3306 on all IP addresses.
>>> ma
>>> How do I do that?/
>>>
>>> mike
>> As per my previous post:
>>
>> In your MariaDB settings, 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
>> _______________________________________________
>
> Did that already.
>
> I did some more checking and found that "port = 3306" was commented out
> in /etc/mysql/mariadb.conf.d/50-server.cnf. I uncommented it and now I
> no longer see the "ERROR 2002 (HY000): Can't connect to MySQL server on
> '192.168.0.222' (115)" message.

Hard to argue with success, But, the default MySQL/MariaDB port *is* 3306.
https://mariadb.com/kb/en/connecting-to-mariadb/

I just commented out the one and only active port= line and restarted the
server. It works fine.

This will display the port in use:

SHOW GLOBAL VARIABLES LIKE 'port';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port | 3306 |
+---------------+-------+
1 row in set (0.002 sec)

The same is true for SESSION VARIABLES.

I'd re-comment the line you changed and restart the SQL server.

If it truly does work, then the change shouldn't be made in a
.cnf file that will be overwritten by a package manager. That
could happen at any time, for example 2 years from now when
you upgrade to a new distribution. And will have forgotten
about the change. Changes like this should go in the same
place the bind-address was changed. Just before or after it
would be OK.

But: your computer, your choice.

--
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/24/20 10:12 AM, Bill Meek wrote:
> On 11/24/20 10:22 AM, Mike Carron wrote:
>> On 11/24/20 3:07 AM, Stephen Worthington wrote:
>>> On Mon, 23 Nov 2020 19:37:37 -0800, you wrote:
>>>
>>>> On 11/23/20 6:09 PM, Stephen Worthington wrote:
>>>>> On Mon, 23 Nov 2020 16:57:05 -0800, you wrote:
>>>>>
>>>>>> On 11/23/20 7:13 AM, Bill Meek wrote:
>>>>>>
>>>>>>      |
>>>>>>
>>>>>>      snip
>>>>>>
>>>>>>      |
>>>>>>
>>>>>>      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.
>>>>>>
>>>>>> I've gone over everything and I have to conclude that port 3306 on the
>>>>>> backend being closed is the culprit. Since mythfrontend wants to use
>>>>>> port 3306 to communicate with the backend I'm not going to get anywhere
>>>>>> until port 3306 is opened. Unfortunately I do not know how to do that.
>>>>>>
>>>>>> How do I open port 3306?
>>>>>>
>>>>>> mike
>>>>> As I said, fix the MariaDB bind-address.  Port 3306 is the port for
>>>>> MariaDB, not MythTV.  MariaDB is still binding to 3306 only on
>>>>> localhost.  It needs to bind 3306 on all IP addresses.
>>>> ma
>>>> How do I do that?/
>>>>
>>>> mike
>>> As per my previous post:
>>>
>>> In your MariaDB settings, 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
>>> _______________________________________________
>> Did that already.
>>
>> I did some more checking and found that "port = 3306" was commented out
>> in /etc/mysql/mariadb.conf.d/50-server.cnf. I uncommented it and now I
>> no longer see the "ERROR 2002 (HY000): Can't connect to MySQL server on
>> '192.168.0.222' (115)" message.
> Hard to argue with success, But, the default MySQL/MariaDB port *is* 3306.
> https://mariadb.com/kb/en/connecting-to-mariadb/
>
> I just commented out the one and only active port= line and restarted the
> server. It works fine.
>
> This will display the port in use:
>
> SHOW GLOBAL VARIABLES LIKE 'port';
> +---------------+-------+
> | Variable_name | Value |
> +---------------+-------+
> | port | 3306 |
> +---------------+-------+
> 1 row in set (0.002 sec)
>
> The same is true for SESSION VARIABLES.
>
> I'd re-comment the line you changed and restart the SQL server.
>
> If it truly does work, then the change shouldn't be made in a
> .cnf file that will be overwritten by a package manager. That
> could happen at any time, for example 2 years from now when
> you upgrade to a new distribution. And will have forgotten
> about the change. Changes like this should go in the same
> place the bind-address was changed. Just before or after it
> would be OK.
>
> But: your computer, your choice.
>

When I leave port = 3306 commented out, the remote frontend errors out
with "Cant find the database."

When I removed the comment, the remote frontend connected to the
database immediately. Now I guess it's time to double check the
backend-setup and make sure no surprises surfaced there.

I built a file with bind-address and port variables and stored it in
/etc/mysql/conf.d. Hopefully it will be safe there.

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 Tue, 24 Nov 2020 12:12:20 -0600, you wrote:

>If it truly does work, then the change shouldn't be made in a
>.cnf file that will be overwritten by a package manager. That
>could happen at any time, for example 2 years from now when
>you upgrade to a new distribution. And will have forgotten
>about the change. Changes like this should go in the same
>place the bind-address was changed. Just before or after it
>would be OK.
>
>But: your computer, your choice.

There is no need to fear a config file being overwritten by a package
update without notice. There is notice. If a package is going to
overwrite a file that has been modified, it will pause and ask you
what you want to do about the differences between the modified file
and the new version. You are given the option of keeping your
modified version, installing the new package version, or doing a diff
to see what the problem is. If you choose to keep your modified
version, a copy of the new version from the package manager gets put
in place with a .dpkg-dist extension added, so you can go back later
and manually apply any changes in the new version. If you choose to
install the new package version, the old modified version is kept by
renaming it to add a .dpkg-old extension, so you can come back later
and re-modify the new version if necessary. While package
installation is paused for you to make a choice, the new version of
the file is put in place but with a .dpkg-new extension, so that you
can do diffs and merge things between it and your modified version,
and then choose to keep your modified version. All of that process
works pretty well - the only problem I have with it is when doing a
full upgrade of the system (eg from 18.04 to 20.04) where I always
have a number of packages where there are modified files and I have to
keep on coming back to the PC to check for it having paused on the
next one.
_______________________________________________
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/24/20 6:38 PM, Stephen Worthington wrote:
> On Tue, 24 Nov 2020 12:12:20 -0600, you wrote:
>
>> If it truly does work, then the change shouldn't be made in a
>> .cnf file that will be overwritten by a package manager. That
>> could happen at any time, for example 2 years from now when
>> you upgrade to a new distribution. And will have forgotten
>> about the change. Changes like this should go in the same
>> place the bind-address was changed. Just before or after it
>> would be OK.
>>
>> But: your computer, your choice.
> There is no need to fear a config file being overwritten by a package
> update without notice. There is notice. If a package is going to
> overwrite a file that has been modified, it will pause and ask you
> what you want to do about the differences between the modified file
> and the new version. You are given the option of keeping your
> modified version, installing the new package version, or doing a diff
> to see what the problem is. If you choose to keep your modified
> version, a copy of the new version from the package manager gets put
> in place with a .dpkg-dist extension added, so you can go back later
> and manually apply any changes in the new version. If you choose to
> install the new package version, the old modified version is kept by
> renaming it to add a .dpkg-old extension, so you can come back later
> and re-modify the new version if necessary. While package
> installation is paused for you to make a choice, the new version of
> the file is put in place but with a .dpkg-new extension, so that you
> can do diffs and merge things between it and your modified version,
> and then choose to keep your modified version. All of that process
> works pretty well - the only problem I have with it is when doing a
> full upgrade of the system (eg from 18.04 to 20.04) where I always
> have a number of packages where there are modified files and I have to
> keep on coming back to the PC to check for it having paused on the
> next one.

Does that mean that moving the config file to /etc/mysql/conf.d is
merely unnecessary or is there a reason to not do it? I'll figure out
later what the proper permissions for such a file/directly should be.
Right now they are at 777.

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 Tue, 24 Nov 2020 19:05:07 -0800, you wrote:

>
>On 11/24/20 6:38 PM, Stephen Worthington wrote:
>> On Tue, 24 Nov 2020 12:12:20 -0600, you wrote:
>>
>>> If it truly does work, then the change shouldn't be made in a
>>> .cnf file that will be overwritten by a package manager. That
>>> could happen at any time, for example 2 years from now when
>>> you upgrade to a new distribution. And will have forgotten
>>> about the change. Changes like this should go in the same
>>> place the bind-address was changed. Just before or after it
>>> would be OK.
>>>
>>> But: your computer, your choice.
>> There is no need to fear a config file being overwritten by a package
>> update without notice. There is notice. If a package is going to
>> overwrite a file that has been modified, it will pause and ask you
>> what you want to do about the differences between the modified file
>> and the new version. You are given the option of keeping your
>> modified version, installing the new package version, or doing a diff
>> to see what the problem is. If you choose to keep your modified
>> version, a copy of the new version from the package manager gets put
>> in place with a .dpkg-dist extension added, so you can go back later
>> and manually apply any changes in the new version. If you choose to
>> install the new package version, the old modified version is kept by
>> renaming it to add a .dpkg-old extension, so you can come back later
>> and re-modify the new version if necessary. While package
>> installation is paused for you to make a choice, the new version of
>> the file is put in place but with a .dpkg-new extension, so that you
>> can do diffs and merge things between it and your modified version,
>> and then choose to keep your modified version. All of that process
>> works pretty well - the only problem I have with it is when doing a
>> full upgrade of the system (eg from 18.04 to 20.04) where I always
>> have a number of packages where there are modified files and I have to
>> keep on coming back to the PC to check for it having paused on the
>> next one.
>
>Does that mean that moving the config file to /etc/mysql/conf.d is
>merely unnecessary or is there a reason to not do it? I'll figure out
>later what the proper permissions for such a file/directly should be.
>Right now they are at 777.
>
>mike

If you move a file created by a package, the next update of that
package will replace the file in the old directory, and you will not
get any notice that it has happened. If that file contains an
uncommented bind-address line, that would not be good. MythTV creates
its mythtv.cnf file in the correct directory for MySQL, but I believe
it is the wrong directory when using MariaDB. So if you want to add
options that are going to override all other prior options, you
probably want to do that in a new file you create that is in the last
directory that is read for configuration files, and is named so that
it is the last config file read from that directory. So a good name
might look like:

zz-myoptions.cnf

But working out exactly what order the directories are read in is
difficult. If you do:

cd /etc/mysql
grep -ir includedir *

you can then see all the !includedir lines that include directories.
But you will also need to look at the MariaDB documentation to find
out which *.cnf file(s) it reads directly in what order before you can
work it all out. If you are lucky the documentation will spell it all
out.
_______________________________________________
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