Database stopped responding
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.
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.