Article ID: 815, created on Oct 6, 2008, last review on May 11, 2014

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.

Email subscription for changes to this article
Save as PDF