By lewpot
Hi. I recently rebooted my droplet due to some issues with performance. Now after rebooting and restarting Nginx and PHP-FPM the website is still down. I tried to restart mySQL but I get the message “ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)”
Any help would be really appreciated as the site is completely down and I’m being flooded with emails of complaint.
Kind regards
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!
Accepted Answer
Thanks for you help. Unfortunately this didn’t fix things and ultimately I’ve had to restore to a snapshot to fix the issue which is unfortunate as I’ve lost a week of work :| I’m going to get some specialist database input moving forwards, lesson learned.
When I type sudo service mysql status I get the response:
mysql stop/waiting
It seems that the MySQL server is not started or does not exist. Please check that you have installed (previously uninstalled perhaps?) MySQL server and that it is running properly. One way to check if MySQL is running is by running any of the following commands:
# ps aucx | grep mysqld
/etc/init.d/mysqld status
sudo service mysqld status
If you are running systemd systems:
sudo systemctl status mysqld.service
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.