• Article for your preferred language does not exist. Below is international version of the article.

Article ID: 117595, created on Sep 30, 2013, last review on May 11, 2014

  • Applies to:
  • Operations Automation

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.

Search Words

Magento

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

MySQl

caea8340e2d186a540518d08602aa065 5356b422f65bdad1c3e9edca5d74a1ae e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF