Today this website wasn’t working for a few hours.
My website is built with WordPress and is hosted on DigitalOcean. They were doing server maintenance — usually, that does not cause any issues but this time it did.
When I tried to access my website, I got this error:
I found out that the issue might be that the MySQL server was turned of.
To fix that I logged in to my droplet web console and ran:
sudo netstat -plt
It showed me programs listening for connections. However, MySQL was not on the list:
Since MySQL was not listed, it was not running. I needed to start MySQL:
sudo systemctl start mysql
To check if MySQL started I ran the netstat command again. And this time MySQL was on the list:
That fixed the issue for me.
Leave a Reply