Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Occasionally for various reasons my webhost 'reboots' my VPS after doing some routine maintenance or upgrades. However when they do, or if I reboot the server for any reason myself, mysql doesn't restart.

To restart it I need to ssh in and run...

service mysql start

How can I make it start automatically like the other programs my website depends on to work properly. Otherwise users of my site see the site down until I can get in and fix it.

Is this an issue with Ubuntu Server or is it my vps host?

share|improve this question
up vote 2 down vote accepted

Add that line to your /etc/rc.local file when the server reboots it will start mysql

share|improve this answer
Thanks. That worked great. I rebooted manually to test and my website came back up right away... – AntonChanning Mar 16 '12 at 17:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.