MySQL reinstall on Windows fails at ‘Start Service’. Why?

Problem Statement:
I just tried to reinstall MySQL 5.5x on Windows 7. But it fails at the point where it tries to start MySQL Service i.e ‘start service’ step.

1. Uninstall MySQL. (Control Panel > Add Remove Programs)
2. Remove any MySQL Service if existing (: sc delete MySQL).
3. This is the most important step(who would have imagined!) – and the one that causes reinstall failure:
On Windows7 delete this hidden dir: c:\programdata\MySQL
This dir contains some log files etc – which causes the reinstall to fail. On Windows Vista/XP etc.. there would be a equivalent dir too (perhaps in another location).

On Windows XP, you should delete this directory:
C:\Documents and Settings\All Users\Application Data\MySQL.


25 responses

  1. Hi

    Good job on the article which is well written.
    This is a great blog!

    I definitely clicked the β€˜Like’ button. πŸ™‚

    Feel free to visit my blog too, over at

    Geek League

  2. Excellent! I just spent 6 hours trying every possible thing. But did not know about the hidden directory!!! Silly Microsoft.

    Cheers, Sal.

  3. Sal > Good to know it helped. I had a tough time figuring this too!

  4. Hi, guys!
    Thanks qnaguru for the post, I could not find enough information to solve the problem.
    In my case (Windows XP) the directory to remove was “C:\Documents and Settings\All Users\Application Data\MySQL”. Only removing it I finally forced MySQL service to work after reinstallation.
    Maximum respect!

  5. Thankyou Nebullus… thats useful info. for windows XP users.

  6. Thanks guys, the hidden directory was it, wasted so much time, should have found this blog first πŸ™‚

  7. It worked with Windows server 2003 Enterprise by deleting C:\Documents and Settings\All Users\Application Data\MySQL.

    You helped me more then the hours I wasted with MySQL comunity forums.

    Yous help was very appreciated, Thank You!

    (By the way, I borrowed a wordpress account just to thank you)

  8. cpoint, mark – glad it helped you. Thanks for leaving comments and useful info!

  9. Many thanks for this post. I had tried everything I could think of before I looked at this and none of it worked. Deleting the hidden directory did it first time. I re-installed MySQL and it all worked perfectly. Fantastic. Thanks again.

  10. You’re a star πŸ˜‰ Never in a million years would I have thought of looking at the hidden files!!!

  11. Thank you for this!!! My development computer crashed last week and I ran into this problem when re-installing.

  12. awesomely helpful….I wasted for over a week on internet for solution of the same u made it ryt.Thnx.

  13. Just a little refinement to this. It is probably wise to repair the registry after. There are some keys that get left behind. Glary Utilities (free) will sort that out in one click!

  14. Great! Solve the problem. Thanks!

  15. great solution,,,,, thank you

  16. THANK YOU!!!!

  17. Thanks a tonne! Why didn’t I see this before?!

    1. Glad that it helped.

  18. eres un GENIO!!! GENIO PURO!!!

  19. Man, I love you, I’ve been searching for a fix in internet all day long, and finally I came in here. THANK YOU!

  20. Thanks a lot πŸ™‚ helped me a lot πŸ™‚

  21. This was a great help πŸ™‚

  22. thank you so much

  23. thanks a lot

  24. Thank you very much! That was what finally helped.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: