Considering there are a number of pieces that are involved in the connection 
being ready why not create a small program that tries to connect and checks the 
return value. If it fails sleep for 500ms to 1 sec and try again for up to 
X-times before aborting altogether?

Bob

-----Original Message-----
From: Rob Desbois [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 05, 2006 11:51 AM
To: mysql@lists.mysql.com
Subject: MySQL service startup time


Hi,
I have an application self-installer program which also installs MySQL and sets 
it up. This is all on Windows.

I have a problem in that when the installer runs 'net start MySQL', it returns 
immediately but the MySQL daemon is not ready for connections immediately.
As the next step in the installation is to create the application database, I 
need to wait until I can connect.

What's the best way to achieve this? At the moment I have a rather crude 5 
second 'sleep', but that isn't always long enough.
Any ideas?

--Rob


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to