Re: check for server start

2002-01-17 Thread Aaron Brick

thanks, sinisa.

in case anyone else wants it, here is the shell fragment i wrote to test for
this condition. there is no timeout.

#!/bin/sh

echo -n waiting for MySQL: 

until [ -n `mysqladmin ping 2/dev/null` ]
do
echo -n .
sleep 1
done
echo  MySQL started.


aaron.

   /\
  |   Aaron Brick (415) 206 - 4685   |
  |   [EMAIL PROTECTED] Room 3501C, SFGH   |

  Programmer Analyst, Functional Genomics Core  
   Sandler Center for Basic Research in Asthma
   Lung Biology Center, Department of Medicine
San Francisco General Hospital
   University of California, San Francisco

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: check for server start

2002-01-12 Thread Sinisa Milivojevic

Aaron Brick writes:
 hi all,
 
 in debian, the /etc/init.d/mysql script waits for the appearance of
 /var/run/mysqld/mysqld.pid to conclude that the server has started. since
 the red hat init script does not do that, my program's own installer has to.
 however we have had a report that waiting for the pidfile is not enough;
 that the server wasn't ready for connections even after the file appeared.
 is that possible, and how can we (in sh) better determine when the server is
 up and ready?
 
 thanks,
 
 aaron brick.
 
/\
   |   Aaron Brick (415) 206 - 4685   |
   |   [EMAIL PROTECTED] Room 3501C, SFGH   |
 
   Programmer Analyst, Functional Genomics Core  
Sandler Center for Basic Research in Asthma
Lung Biology Center, Department of Medicine
 San Francisco General Hospital
University of California, San Francisco
 

Absolutely the best way to do it is:


mysqladmin ping

-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   www.mysql.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




check for server start

2002-01-11 Thread Aaron Brick

hi all,

in debian, the /etc/init.d/mysql script waits for the appearance of
/var/run/mysqld/mysqld.pid to conclude that the server has started. since
the red hat init script does not do that, my program's own installer has to.
however we have had a report that waiting for the pidfile is not enough;
that the server wasn't ready for connections even after the file appeared.
is that possible, and how can we (in sh) better determine when the server is
up and ready?

thanks,

aaron brick.

   /\
  |   Aaron Brick (415) 206 - 4685   |
  |   [EMAIL PROTECTED] Room 3501C, SFGH   |

  Programmer Analyst, Functional Genomics Core  
   Sandler Center for Basic Research in Asthma
   Lung Biology Center, Department of Medicine
San Francisco General Hospital
   University of California, San Francisco

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: check for server start

2002-01-11 Thread Robert L. Yelvington

a quick fix would be to see if the default port is open or not...something
like:

netstat -an | grep 3306

you could put that in a shell script and do all sorts of tests against it.

-OR-

you could use mysqladmin and whatever flag used to check status.

hope this helps.

~rob

-Original Message-
From: Aaron Brick [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 11, 2002 1:01 PM
To: [EMAIL PROTECTED]
Subject: check for server start


hi all,

in debian, the /etc/init.d/mysql script waits for the appearance of
/var/run/mysqld/mysqld.pid to conclude that the server has started. since
the red hat init script does not do that, my program's own installer has to.
however we have had a report that waiting for the pidfile is not enough;
that the server wasn't ready for connections even after the file appeared.
is that possible, and how can we (in sh) better determine when the server is
up and ready?

thanks,

aaron brick.



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php