Database stopped responding

Hi there

I have been running a Laravel website and a Wordpress subdomain with Apache, MySQL, and Ubuntu DigitalOcean. Today I started getting this error:

Whoops, looks like something went wrong (error from main Laravel website:) Error establishing a database connection (error from Wordpress blog)

Apparently, it looks like an error from its database. I tried accessing phpMyAdmin but I could not login.

Then, while logged in with “root”, I tried mysql -u root -p. After providing correct password, I got this error:

ERROR 2002 (HY000):  Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

What could be the reason? Has the DB been compromised. Someone might have got an access through phpMyAdmin and deleted both DBs. But I should still be able to login to MySQL. I do have a backup of both DBs.

Any suggestions/help please.

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Hey there,

Thank you for reaching out to us!

I would make sure that MySQL is actually running. It may have crashed if the Droplet ran out of memory. Usually MySQL would be the first thing to go during resource contention for memory. I would try a service mysql restart or a reboot before jumping to the thought that the databases have been destroyed.

Happy coding,

Jon Schwenn Platform Support Specialist DigitalOcean