Symptoms

When an URL powered by Magento is accessed, following error is thrown:

SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Cause

Magento configuration files, located at

/usr/local/pem/vhosts/<WEBSPACE_ID>/webspace/siteapps/magento-12345/htdocs/app/etc/local.xml 
/usr/local/pem/vhosts/<WEBSPACE_ID>/webspace/siteapps/magento-12345/htdocs/app/etc/local_myserver.xml 

Contain incorrect database access credentials (here 12345 is the application instance ID, can be different in each case).

Resolution

Set the access credentials correctly. Passwords for databases managed by POA can be updated in Customer's Control Panel, More Services > Databases.

Internal content

Link on internal Article