indofrezz
By:
indofrezz

Magento Shows error : SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)

July 7, 2015 1.5k views
LAMP Stack PHP Ubuntu

Hi, When I installing magento in my 512mb droplets, everything goes fine, until I tried to add a product, then error occurred. When I reveal error xml in magento, it shows this :

SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)

I've Tried to add swap and everything but it failed. and the weird thing is , at the beginning I can access my phpmyadmin. But when I the error occurred, I can't access my mysql as root, although my username and password are correct. please help.

3 comments
Be the first one to answer this question.