tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* mysql start script
@ 2003-10-15 16:57 Rezk Mekhael
  0 siblings, 0 replies; only message in thread
From: Rezk Mekhael @ 2003-10-15 16:57 UTC (permalink / raw)


Hi Managers,

I have 2 questions:

I have Ds20 with OS 5.1v, I am running mysql server, and some time it
stop for that I create csh script to watch it, and if goes down restart
it.


1) The Script: 
#!/bin/csh

# checks the mysql server daemon and restart if needed
# customized for Mysql on lupine Rezk Mekhael 10/2003
umask 077
set tmp=/tmp/chkmysql.$$
set manager=rezk@clunet.edu
ps ax  > $tmp
if ( `grep -c "mysql" $tmp` != "0"  ) then
        echo "listener is running" > /dev/null
else
        /sbin/rc3.d/s100mysql
        echo "Mysql Server is down, starting it up"  > /tmp/message.$$
        /usr/bin/mail  $manager < /tmp/message.$$
        rm -r /tmp/message.$$
endif

rm -f $tmp
=======================================

2) This file "/sbin/rc3.d/s100mysql" contains: 

cd /usr/local/mysql; 
bin/safe_mysqld --user=mysql



My questions: 	1) I can run this file S100mysql by hand but the script
can not run it, why?
			2) Does any one have a startup script for mysql
in /sbin/rc3.d?
 

-rwxrwxr-x   1 root     bin           53 Oct 15 00:17
/sbin/rc3.d/s100mysql
lrwxrwxrwx   1 root     system        37 Sep 12 12:06 /usr/local/mysql
-> mysql-max-4.0.13-dec-osf5.1-alphaev67
lrwxrwxrwx   1 1265     system        11 Sep 12 12:06
/usr/local/mysql/bin/safe_mysqld -> mysqld_safe 

--
Sincerely,
Rezk Mekhael



-- 
*** Incoming / Outgoing Mail scanned for known Viruses by CLUnet ***



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-15 16:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-15 16:57 mysql start script Rezk Mekhael

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox