Applicable to:
- Plesk for Linux
Symptoms
-
Unable to log in to Plesk with the following error message:
PLESK_ERROR: ERROR: PleskDBException: Unable to connect to database: mysql_connect(): No such file or directory /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible. (Abstract.php:69)
-
MySQL service is stopped and cannot be started:
# service mysql start
[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed! -
When stopping MySQL, the operation fails with:
# service mysql stop
/usr/sbin/mysqld: Error on realpath() on '/var/lib/mysql-files' (Error 2)
[ERROR] Failed to access directory for --secure-file-priv. Please make sure that directory exists and is accessible by MySQL Server. Supplied value : /var/lib/mysql-files161215 [ERROR] Aborting
Cause
The directory /var/lib/mysql-files
is missing. This is a mysql
package bug #1637280.
Resolution
-
Connect to the Plesk server via SSH.
-
Create the
mysql-files
directory using these commands:# mkdir /var/lib/mysql-files
# chown -R mysql:mysql /var/lib/mysql-files/
# chmod 700 /var/lib/mysql-files/ -
Start MySQL:
# service mysql start
Comments
0 comments
Please sign in to leave a comment.