Mailing List Archive

1 2  View All
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

1 2  View All