Report this

What is the reason for this report?

I restored my Magento site from yesterdays Digital Ocean backup and now can't connect to database. Does anyone have any ideas on fix?

Posted on August 9, 2016

when trying to connect to mysql database while in Putty, I get the following: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (111)



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Try starting your MySQL server by running the command below.

sudo service mysql start Or sudo service mysqld start

Hello there,

The MySQL service is down and you need to start it. You can do this with the following command

  1. sudo systemctl start mysql.service

If you’re still experiencing the issue, then you’ll need to check the MySQL logs or the journal log for additional information.

On Ubuntu systems, the default location for the MySQL is /var/log/mysql/error.log

You can find more information here:

https://www.digitalocean.com/community/tutorials/how-to-access-mysql-error-logs

Regards

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.