Bug #29164 Cannot connect to mysql server after reboot, net stop appears to hang
Submitted: 17 Jun 2007 19:10 Modified: 17 Jul 2007 20:56
Reporter: Brad Harris Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server: General Severity:S2 (Serious)
Version:5.0.24 OS:Windows (2003 server sp2)
Assigned to: CPU Architecture:Any
Tags: connect, error 2003

[17 Jun 2007 19:10] Brad Harris
When applying MS operating system changes and doing the normal restart, I get the below message when trying to connect via the command line interface. No matter which login (root or application) I use, it fails with the same message Application programs using the PHP mysql interface also fail.  

ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)

When this happens, the mysql server won't stop.  When I type net stop mysql, it hangs indefinitely (putting out the little dots) and I am forced to reboot again.  I tried making the service manual instead of automatic so that I could better control access by starting the service myself.  This did not help initially. However, after rebooting several times, starting mysql service each time, and experiencing the same inability to login, I began researching the manual.  After about 5-7 minutes, I typed in the login information and it worked.  Application errors stopped and all was OK.  

I would write this off to an anomoly except that the exact same scenario has happened twice.  Once about 3 weeks ago and again today.  The load on the mysql server is minimal as most of the heavy database has been moved off of this server. When this happened, 3 weeks ago I deinstalled the windows updates to see if that had caused the problem.  That did not help.  I reinstalled the changes.  Several reboots later, the problem went away.

How to repeat:
Install windows update and reboot machine running 2003 server sp2, php 5.1.4 and mysql 5.0.24.  

Suggested fix:
Unknown.  It looks to me as though the server is taking a long time to come up.  It cant be stopped because it hasnt fully started yet (even though it says it has when I do the manual start).  When it is up long enough, it will accept connections and all is well.  Unfortunuately, this is after literally hundreds of connection errors generated by the applciations.
[17 Jun 2007 19:31] Brad Harris
I am using only myIsam tables.  I am using the standard configuration - I did not change any of the ini values
[17 Jun 2007 20:56] MySQL Verification Team
Thank you for the bug report. Looks it is the same issue as bug:
http://bugs.mysql.com/bug.php?id=28805. Please see the below
reporter's comment:

"Still, we found a new workaround. The MySQL service was running under the local SYSTEM
account. We changed it so it now runs from another account specifically created for this
service. This account belongs to the local Users group and we gave it specific rights to
read and write to and from the MySQL data folder."

Thanks in advance.
[17 Jul 2007 23: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".