  | | | MySQL service startup time | MySQL service startup time 2006-07-05 - By Bartis, Robert M (Bob)
Back 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:robert.desbois@(protected)] Sent: Wednesday, July 05, 2006 11:51 AM To: mysql@(protected) 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/mysql?unsub=bartis@(protected)
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=mysql@(protected)
|
|
 |