i was wondering if any has a script that can be run in CRON to monitor and
start mysql if it dies. an added bonus would be that it runs (my)isamchk
if the server dies right after you start it, etc.
this is my current script, but it doesn't seem to work when run from
CRON -- from the command line it works fine... ??
print ("MySQL starter...\n");
open (OUTFILE, ">>/home/appsweb/bin/check.log");
if (`/usr/ucb/ps -ax | grep "safe_mysqld" | grep -v grep`)
print OUTFILE ("$date : MySQL up...\n");
print OUTFILE ("$date : MySQL down... restarting now...\n");
bin/safe_mysqld --log=/home/appsweb/mysql/log &");