MySql not restarting on Ubuntu
Today I came across an issue with MySql not restarting correctly. In addition, when rebooting the server, MySql would run for a few seconds and then crash, and would not restart after doing so.
It seemed to be down to a rogue MySql process running which was stopping it from starting up again:
Running this command gave the following results:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME mysqld 3119 mysql 10u IPv6 13406 0t0 TCP *:mysql (LISTEN)
So, I killed process 3119:
kill -9 3119
And then restarted again successfully:
sudo /etc/init.d/mysql restart * Stopping MySQL database server mysqld [ OK ] * Starting MySQL database server mysqld [ OK ] * Checking for tables which need an upgrade, are corrupt or were not closed cleanly.
Curiously, this happened 2 times, both straight after creating a new subdomain in Plesk. Not sure if it’s related or just a coincidence.