Bug #28628 Config Wizard can't connect (race condition)
Submitted: 23 May 2007 19:40 Modified: 26 Feb 11:04
Reporter: Olaf van der Spek (Basic Quality Contributor)
Status: Closed
Category:Server: Installing Severity:S3 (Non-critical)
Version:5.1.18,,5.1.21, 6.0.0 OS:Microsoft Windows
Assigned to: Iggy Galarza Target Version:5.1
Tags: qc
Triage: D1 (Critical)

[23 May 2007 19:40] Olaf van der Spek
Description:
Hi,

While installing 5.1.18 and 6.0.0, I encountered the following error:
Connection Error
The security settings could not be aplpied to the database because the connection has
failed with the following error.

Error Nr. 2003
Can't connect to MySQL server on 'localhost' (10061)

If a personal firewall ...

If you are re-installing ...

Retry | Skip

When I click Retry, it continues without error.
So I think there's a race condition and the server isn't ready yet when the wizard tried
to connect.

This may be related to dual-core / dual-socket systems.

How to repeat:
Install.
[23 May 2007 22:25] Shane Bester
i suspect innodb log files are being written which takes some time and during that time
service is 'started' by mysql doesn't accept tcp connections yet. just a thought.
[24 May 2007 15:16] Valeriy Kravchuk
Thank you for a problem report. Please, send my.ini file that was used/generated.
[24 May 2007 15:19] Olaf van der Spek
my.ini

Attachment: my.ini (application/octet-stream, text), 8.87 KiB.

[25 Jun 2007 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[25 Jun 2007 8:31] Olaf van der Spek
Hmm, I did upload my my.ini a month ago. A bug in the bug tracker?
[28 Jun 2007 12:26] Sveta Smirnova
Thank you for the feedback.

I can not repeat described behaviour with MySQL 5.1.19

Please upgrade and try with new version and if you can repeat indicate if you have
firewall and every setting you set up in the Configuration Wizard.
[28 Jun 2007 17:08] Olaf van der Spek
I've repeated this today with 5.1.19 in a Windows XP setup on VMware Workstation.
No firewall, all defaults in the config wizard.
[7 Sep 2007 18:02] Olaf van der Spek
Doesn't the Windows Service Control Manager provide a way to check whether the service is
fully running?
[19 Dec 2007 21:53] Patrick Crews
Tested multiple installations of the 4.1 and 5.0.52 .msi files without incident.

Noted that there is a variable (5-30 seconds -- depending on machine load) when a user
enters an incorrect, existing password when trying to change security settings during
configuration.  However, this seems minor and an acceptable tradeoff to fix the bug.

Ok to push.
[12 Feb 22:41] Iggy Galarza
Marked bug#20069 a duplicate.
[26 Feb 10:58] MC Brown
A note has been add to the 5.1.23, 5.0.51a and 6.0.5 changelogs: 

When running the MySQL Instance Configuration Wizard, a race condition could exist that
would fail to connect to a newly configured instance. This was because mysqld had not
completed the startup process before the next stage of the installation process.
[26 Feb 11:04] Olaf van der Spek
To the changelog? Shouldn't it at least go in the readme?

Still, this is not a (proper) solution.