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.
Solution:
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).
Note: If readers know where the equivalent dir for Windows Vista/XP are – please let me know – i shall update this post.
May 13, 2011 @ 10:11:51
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 http://geekleague.wordpress.com.
Greetings
Geek League
Jun 15, 2011 @ 10:11:29
Excellent! I just spent 6 hours trying every possible thing. But did not know about the hidden directory!!! Silly Microsoft.
Cheers, Sal.
Jun 21, 2011 @ 04:08:00
Sal > Good to know it helped. I had a tough time figuring this too!
Jul 08, 2011 @ 16:14:21
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!
Jul 11, 2011 @ 09:56:57
Thankyou Nebullus… thats useful info. for windows XP users.
Oct 21, 2011 @ 16:36:10
Thanks guys, the hidden directory was it, wasted so much time, should have found this blog first
Nov 17, 2011 @ 03:27:56
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)
Nov 20, 2011 @ 17:48:27
cpoint, mark – glad it helped you. Thanks for leaving comments and useful info!
Feb 10, 2012 @ 00:31:55
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.
Jack
Feb 18, 2012 @ 23:03:00
You’re a star
Never in a million years would I have thought of looking at the hidden files!!!
Apr 23, 2012 @ 10:59:19
Thank you for this!!! My development computer crashed last week and I ran into this problem when re-installing.
May 23, 2012 @ 01:18:12
awesomely helpful….I wasted for over a week on internet for solution of the same problem.now u made it ryt.Thnx.