RE: MySQL autorestart when crash or stop

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Alejandro Mesa (AlejandroMesa_at_discussions.microsoft.com)
Date: 12/22/04


Date: Wed, 22 Dec 2004 09:21:05 -0800

Sorry, but this is a Microsoft SQL Server newsgroup.

AMB

"Solange Ezveff" wrote:

> 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 --->
>
> #!/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
>



Relevant Pages

  • Re: MySQL autorestart when crash or stop
    ... "Solange Ezveff" wrote in message ... > Trying to restart MySQL when it is down from a crontab event. ... > And a crontab event */each several minutes that execute the script. ...
    (microsoft.public.sqlserver.programming)
  • Re: Crontab auto-restart MySQL
    ... > Trying to restart MySQL when it is down from a crontab event. ... > Placed the following script kindly provided by a Gentleman in a file: ... and check the results; while mysqld is running ...
    (comp.os.linux.misc)
  • Crontab auto-restart MySQL
    ... Trying to restart MySQL when it is down from a crontab event. ... Placed the following script kindly provided by a Gentleman in a file: ... And a crontab event */each several minutes that execute the script. ...
    (comp.os.linux.misc)
  • Crontab auto-restart MySQL
    ... Trying to restart MySQL when it is down from a crontab event. ... Placed the following script kindly provided by a Gentleman in a file: ... And a crontab event */each several minutes that execute the script. ...
    (comp.os.linux.development.apps)
  • MySQL autorestart when crash or stop
    ... Trying to restart MySQL when it is down from a crontab event. ... Placed the following script kindly provided by a Gentleman in a file: ... And a crontab event */each several minutes that execute the script. ...
    (microsoft.public.sqlserver.programming)