Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.