Unable to log in to Plesk: Unable to connect to database: mysql_connect(): Permission denied /var/lib/mysql/mysql.sock (Error code: 2002)

Created:

2016-11-16 13:13:24 UTC

Modified:

2017-04-24 11:17:21 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to log in to Plesk: Unable to connect to database: mysql_connect(): Permission denied /var/lib/mysql/mysql.sock (Error code: 2002)

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.0 for Linux

Symptoms

Unable to log in to Plesk, the following error appears:

ERROR: PleskDBException: Unable to connect to database: mysql_connect(): Permission denied /var/lib/mysql/mysql.sock (Error code: 2002). Please check that database server is started and accessible. (Abstract.php:69)

The permissions of /var/lib/mysql/ are different from listed below:

# stat /var/lib/mysql/ | grep Access
Access: (0755/drwxr-xr-x) Uid: ( 27/ mysql) Gid: ( 27/ mysql)

Cause

Incorrect permissions. Default permissions for /var/lib/mysql/ folder are 755.

Resolution

Change the permissions:

# chmod 755 /var/lib/mysql/
Have more questions? Submit a request
Please sign in to leave a comment.