I'm unable to retart mysql
regardless of how I call it - via upstart script or directly, I get a Job failed to start.
/etc/init.d/mysql restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql restart
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop mysql ; start mysql. The restart(8) utility is also available.
start: Job failed to start
1 Reply
This StackExchange post should help you with possibly identifying a reason for why MySQL isn't starting:
https://serverfault.com/questions/345951/cant-restart-mysql/345958
The steps it suggests are:
Check the logs to see if there's anything
Ubuntu/Debian:
sudo less /var/log/mysql/error.log
CentOS:
sudo less /var/log/mysqld.log
See if it's running:
ps aux | grep mysql
If it is indeed not running, then you may want to check the logs:
Ubuntu/Debian:
sudo less /var/log/mysql/error.log
CentOS:
sudo less /var/log/mysqld.log
Check database integrity
After checking the logs and you don't see anything, you may want to boot into Rescue Mode to run a fsck to make sure there's no corruption in the db.
Booting into Rescue Mode can be done from the "Rescue" tab in Linode Manager.
Once that is done, you can access your Linode via our Lish Console which is in the "Rescue" tab in Classic Manager, or by selecting the "Launch Console" option in Cloud Manager.
Then you can perform a filesystem check. The steps are outlined in the guide below:
Performing a File System Check
Update packages
I'd also recommend making sure your packages and their dependencies are up-to-date:
Ubuntu/Debian:
sudo apt-get update && sudo apt-get upgrade
CentOS:
sudo yum update && sudo yum upgrade
Another important note:
With the recent MDS vulnerability maintenance on our hosts, we're having customers who haven't rebooted in a while and are learning their Linodes are running outdated distributions versions that need to be updated. In these cases, the two options I'd recommend are to either follow one of our guides for upgrading your distribution, or to create a new Linode, using an updated version of the same distribution, and then copy the files over. In both cases, you'll want to check any software packages on your Linode, mostly likely needing to reinstall and/or reconfigure many.