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

Mike Carron jmcarron at gmx.com
Tue Nov 24 03:36:01 UTC 2020


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



More information about the mythtv-users mailing list