Crontab auto-restart MySQL
From: Solange Ezveff (se_at_friend.fr)
Date: 12/22/04
- Next message: Jerry Peters: "Re: Direct Linux syscalls"
- Previous message: Roger Leigh: "Re: Linux timers"
- Next in thread: Jens.Toerring_at_physik.fu-berlin.de: "Re: Crontab auto-restart MySQL"
- Reply: Jens.Toerring_at_physik.fu-berlin.de: "Re: Crontab auto-restart MySQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 22 Dec 2004 03:12:23 -0800
Hi,
Trying to restart MySQL when it is down from a crontab event.
Placed the following script kindly provided by a Gentleman in a file :
checksql.php --->
#!/bin/sh
/etc/rc.d/init.d/mysqld status >/dev/null 2>&1
if [ $? -ne 0 ]; then /etc/rc.d/init.d/mysqld restart >/dev/null 2>&1;
fi
And a crontab event */each several minutes that execute the script.
Problem : the script is not functioning.
+ :
- /etc/rc.d/init.d/mysqld status > return "stopped" or "started"
- Crontab event as configured launch correctly scripts (tested on a
send mail script)
- /etc/init.d/mysqld status or /etc/rc.d/mysqld status does not work.
I thank you for your advises.
Kind Regards
Solange
- Next message: Jerry Peters: "Re: Direct Linux syscalls"
- Previous message: Roger Leigh: "Re: Linux timers"
- Next in thread: Jens.Toerring_at_physik.fu-berlin.de: "Re: Crontab auto-restart MySQL"
- Reply: Jens.Toerring_at_physik.fu-berlin.de: "Re: Crontab auto-restart MySQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|