Symptoms
-
Plesk interface is not accessible with this message in a web browser:
PLESK_INFO: Plesk\Exception\Database: DB query failed: SQLSTATE[HY000] [2002] Connection refused
PLESK_INFO: DB query failed: SQLSTATE[HY000] [2002] No such file or directory
-
MySQL/MariaDB service status reports this error:
# service mysql status
...
Active: deactivating (stop-sigterm) (Result: exit-code) since Thu 2024-06-20 06:01:50 EEST; 36min ago
...
mariadbd[561691]: [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
mariadbd[561691]: [Note] InnoDB: Check that you do not already have another mariadbd process using the same InnoDB data or log files.
Cause
Stuck mysqld process:
# ps auxfffwww | grep mysql
mysql 2222309 20.6 9.3 17574576 6182096 ? Sl Apr25 12999:45 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
or mariadb process:
# ps aux | grep mariadb
mysql 456786 86.6 3.9 9417400 2557260 ? Ssl Jun19 826:49 /usr/sbin/mariadbd
Resolution
-
Connect to the Plesk server via SSH.
-
Find the PID of the stuck MySQL/MariaDB service:
# ps aux | grep -E 'mysql|mariadb' | grep -v 'grep'
mysql 456786 86.6 3.9 9417400 2557260 ? Ssl Jun19 826:49 /usr/sbin/mariadbd -
Using the process PID, kill the stuck process:
# kill -9 456786
-
Start the MySQL/MariaDB service:
# service mysql start
# service mariadb start
Comments
0 comments
Please sign in to leave a comment.