Product:
Search Type:

I cannot access Plesk CP getting error: "ERROR: Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11)"

Article ID: 815 
Last Review: Dec,20 2007
APPLIES TO:
  • Plesk for Linux/Unix

SYMPTOMS

Full error message looks like:

ERROR: Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11) 0: /usr/local/psa/admin/auto_prepend/auth.php3:67 psaerror(string "Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11)")


CAUSE

Error code 11 means:
# perror 11
Error code 11: Resource temporarily unavailable



RESOLUTION

Make sure that MySQL is running and you can access it from the command line:
# mysql  -uadmin -p`cat /etc/psa/.psa.shadow` psa

If it works, try to increase maximum connection number for MySQL server. By default the number of simultaneous connections is limited to 100, if MySQL is highly used on your server, you need to increase this limit in /etc/my.cnf in section [mysqld]:

[mysqld]

set-variable=max_connections=200


Then restart MySQL.

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
*Please type the code you can see.
* - required fields