Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL++ - Programming with the C++ API to MySQL
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
MySQL service startup time

MySQL service startup time

2006-07-05       - By Bartis, Robert M (Bob)

 Back
Reply:     1     2     3  

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)