Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Windows Server 2008 with MySQL installed and every time I reboot the server the MySQL Service doesn't start right away. A look into the Windows Eventlog shows that the MySQL Service was hung at startup. Looking at the Services.msc console shows the service state at Starting...

Eventually, like 10 minutes, the MySQL Service actually finishes the startup process and the database becomes available for my Wordpress server...

I looked at the MySQL .err files and didn't find anything that would indicate a delay in the statup process...

Can anyone suggest a way to determine what is causing the delay, and more importantly, how to prevent the delay in the MySQL Startup?

UPDATE: Here is the .err log contents from the shutdown to the startup complete. Notice the startup begins at 10:30:00 and the MySQL isn't ready for connections until 10:47:14, a full 17 minutes later:

100322 10:27:06 [Note] C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld: Normal shutdown

100322 10:27:06 [Note] Event Scheduler: Purging the queue. 0 events
100322 10:27:06  InnoDB: Starting shutdown...
100322 10:27:08  InnoDB: Shutdown completed; log sequence number 4 3854351346
100322 10:27:08 [Warning] Forcing shutdown of 1 plugins
100322 10:27:08 [Note] C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld: Shutdown complete

100322 10:30:00 [Note] Plugin 'FEDERATED' is disabled.
100322 10:30:01  InnoDB: Started; log sequence number 4 3854351346
100322 10:47:14 [Note] Event Scheduler: Loaded 0 events
100322 10:47:14 [Note] C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld: ready for connections.

UPDATE 2: MySQL is configured as a service (part of the install process, nothing I did) and executes the following syntax (as it appears in the registry):

"C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.1\my.ini" MySQL
share|improve this question
Your problem might be relate to this bug: Try clearing your windows\temp directory, and setting up a specific temp folder for mysql in your my.ini – Pablius Jun 28 '13 at 21:35
The response of @Pablius did the job for me: - The service startup time was very long and it was impossible to connect - I had 1M+ files in c:\windows\temp Changing the parameter tmpdir (in my.ini) to a dedicated folder solved the problem. – NicolasF Aug 26 '15 at 14:27

Completely guessing: it sounds like it might not be stopping cleanly and thus going through an InnoDB recovery.

Provide the output 10 lines before restart to current from your MySQL log.

Edit 1

Thanks for the additional information. This looks like it might not be MySQL but Windows. What's specified in the service? Is there a script?

Edit 2

I misread previously. It looks like that there is a delay during InnoDB startup but it seems unusually long.

100322 10:30:01  InnoDB: Started; log sequence number 4 3854351346
100322 10:47:14 [Note] Event Scheduler: Loaded 0 events

Are you actually using InnoDB tablespace? show table status; within your DB will show the ENGINE. If not, I suspect disabling it will hasten startup time.

Edit 3

Wordpress doesn't appear use InnoDB by default. If you can verify none of your databases are InnoDB, adding skip-innodb to your my.ini will likely increase startup speed.

share|improve this answer
Do you mean to say it might not be stopping cleanly? I added the log file info into the question... – Dscoduc Mar 23 '10 at 15:20
Yes, exactly right. I corrected, thanks. – Warner Mar 23 '10 at 15:41
Provided the registry entry that starts the service (as it was installed by the MySQL installation process)... When I start it with the same syntax, but replacing the MySQL at the end with the --console syntax it starts right up... – Dscoduc Mar 23 '10 at 15:48
I switched to my Wordpress database, ran the 'show table status' syntax and it returned 12 rows in set... – Dscoduc Mar 23 '10 at 15:53
Could it be that my tables need to be optimized? I am looking for that syntax right now... – Dscoduc Mar 23 '10 at 15:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.