dbTalk Databases Forums  

MySQL autorestart when crash or stop

microsoft.public.sqlserver.programming microsoft.public.sqlserver.programming


Discuss MySQL autorestart when crash or stop in the microsoft.public.sqlserver.programming forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Solange Ezveff
 
Posts: n/a

Default MySQL autorestart when crash or stop - 12-22-2004 , 11:13 AM






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

Reply With Quote
  #2  
Old   
Keith Kratochvil
 
Posts: n/a

Default Re: MySQL autorestart when crash or stop - 12-22-2004 , 11:17 AM






This is a Microsoft SQL Server newsgroup. If I knew MySQL I would try to
help, but I don't, so I can't.

--
Keith


"Solange Ezveff" <se (AT) friend (DOT) fr> wrote

Quote:
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


Reply With Quote
  #3  
Old   
Alejandro Mesa
 
Posts: n/a

Default RE: MySQL autorestart when crash or stop - 12-22-2004 , 11:21 AM



Sorry, but this is a Microsoft SQL Server newsgroup.



AMB

"Solange Ezveff" wrote:

Quote:
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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.