|
Hi everyone, What's the cleanest way to make a private instance of mySQL startup automatically in case the server gets rebooted? Thanks! |
|
Create a cron job that looks like this:
Hope that helps! Sweet, thanks very much Seanf. And what about some sort of watchdog script to see if my DB is responding? I've always used a shared DB server where if the DB went offline in the middle of the night, some other user would call and complain. But now with a personal instance, it could go offline and sit there hours before I notice it. Supervisor is what you need, but I don't have a step-by-step procedure to set it up. I know it's possible, as I've seen many of our customers running it. Thanks again Seanf, I found a guide for configuring supervisor on Webfaction. I'll look into it. One more little question about your solution to this question: What does /dev/null have to do with making mySQL restart after reboot? Thanks! It doesn't really have anything to do with restarting MySQL. It suppresses output from the cron job - just something I tend to do with all of my cron jobs, unless I specifically want to log the output somewhere. I see. Great, thanks! |