Cannot create Windows Service for MySQL.Error:0
I was installing MySQL on a Windows 2008 64bits machine today. The installation went smooth as usual, I got the MySQL configuration screen wizard at the end of the MySQL installation and went through filling in those service configuration details, MySQL root ..etc. However, at the end of the execution part where it writes the changes, it shows the following message during the attempt to start the MySQL services.
Cannot create Windows Service for MySQL.Error:0
It was my first time getting this message as I have been setting up MySQL for lots of Windows server without any issues on the past. Here’s what I did to get it resolve:
1. Start > All Programs >MySQL > MySQL Server 5.x > MySQL Server Instance Config Wizard.
2. Hit the Next and select the options “Remove Instance” and complete the process.
3. Fire up the MySQL Server Instance Config again, this time select the Configure Instance with Standard Configuration and go through the setup again. It should get your MySQL configured again.
The possible cause of the error is due to the MySQL Services has been installed and started on your server’s prior to the configuration by MySQL. Removing the installed instances and reset it up will help to resolve this.
164 Comments to “Cannot create Windows Service for MySQL.Error:0”
Post comment
Categories
Recent Posts
- yum update – TypeError: unsubscriptable object
- Magento with Windows IIS
- Helm3 : File Manager Not Showing any Files
- Helm4 Error on Remove Domain
- SQL 2008 Maintenance Plan Execution Error
Recent Comments
- tbx on Cannot create Windows Service for MySQL.Error:0
- bhumi on Cannot create Windows Service for MySQL.Error:0
- Sue on Cannot create Windows Service for MySQL.Error:0
- Shubham on Cannot create Windows Service for MySQL.Error:0
- Tommy on Cannot create Windows Service for MySQL.Error:0


nope, this stuff didn’t work 4 me!!!!
i’m working on windows 7 beta.
Let’s see postgresql can do it!
thanks a lot!! it really worked for me..
If this doesnt work go to C:\Documents and Settings\All Users\Application Data (Hidden Folder) and check to see if there is a MySQL directory. If so, delete it and try to reinstall it again, worked for me.
MUCHAS GRACIAS! your fix was the simplest and easiest of several i tried! i wish i had found yours first!
Thanks!!!! Thanks this worked…Great Even the problem of Error 1045 Resloved…Great..I Unistalled every thing removed the Program Data folder..(Vista)..And then followed Ur Steps..And it worked…
Hi Andy,
worked like a charm !
thanks a lot,
Cool man. The number of posts on the mysql site was huge. I found the “Solution is here” and found this. Thanks
Did not work for me on a windows 2008 server and mysql-5.1.35-winx64.
wow thanks…this works perfectly for me…
Well if this dosen`t work for you, try looking in your firewall programs acces and grant priveleges. My firewall blocked it and that`s why that Error 0 appeared.
Hi, I fixed this (on Server 2008 STD 32bit) by
1) removing the instance using the MySQL Server Instance Config Wizard
2) uninstall MYSQL completely.
3) Reinstall MYSQL, but do a custom install and change Install Directory to something like C:\MySQL\
4) Complete the installation and run the configuration utlity again.
It seems like the config can’t handle spaces in the program directory location, e.g. C:\Program Files\MySQL\MySQL Server 5.1 = too many spaces.
hope that helps.
Seems the config utility cannot handle spaces in the program directory location, e.g.
C:\Program Files\MySQL\MySQL Server 5.1 = too many spaces.
hope that helps. Wasted 2 hours tring to figure this out!!
I had the same problem. Tried your hint but still nothing. Disabled my Windows Firewall and other protections. Then I installed the version 5.0… Still nothing. The only way I could make it work was installing the version 4.1 of mysql. I use Windows Vista Business.
Thanks everyone!
After searching everywhere without hope and get crazy finally i found the solution.
1) First, uninstall MySQL server if is installed.
2) Close any Antivirus – Firewall application you have.
3) Make sure you have enabled Windows firewall and give exception to MySQL on port 3306.
This is important, so make sure you do that.
4) Install the Server.
Hopefully you did it…
For some reason all most, every Antivirus i test cut’s Configuration attempt to open the
port 3306.
Thanks, worked for me, so simple!!!!
cheers vb
didnt worked for me , though i did the same , any more suggestions.
many thanks!
It did not work for me. Do I need to remove any registry keys.? My firewall on windows xp sp3 has been disabled. There are no mysql services running under services mmc.
Please Please assist
Thanks!
Nope, doesn’t work for me . I have tried the exact same steps mentioned in the blog but still get the same error when I try to reconfigure the instance.
“Cannot start service: Error 0″
I have Windows XP + MySql 5.1.36
The steps in the blog probably work for older versions of MySQL so I’m going to try and instal something older.
Thanks a lot
Excellent solution! Thanks, Andy … it worked like a gem. I was installing MySQL V5.1.36-32 on a Windows Vista 64.
Thanks Much!
Thanks for the “sc delete mysql” command – it was the last piece of the puzzle for me!
Works fine, lasts a long time.
But… why on an original install would this ever occur? Makes no sense.
Oh well it worked! I was trying to install MYSQL since so many weeks and finally today I got it installed thanks a lottt
I had similar problems. Details of the problem were found in the Windows Event log and the xxxxx.err file in the C:\Program Files\MySQL\MySQL Server 5.0\data folder.
It turns out that the ib_logfile0 file was not being created correctly, saying it was 30mb but the configuration file specified 10mb. I changed the configuration file to ask for 30mb, and deleted the ib_logfile0 files and the data file. After that, the installation worked.
THANK YOU so much!
Neat!. Thank you.
thanks men,you rock.
Ahaan… I will follow.
thanks!
works like a peach… thanks mate
I have followed your solution to the end but it did not work.
What can really be the problem.
Cus i can feel that its a very easy solution.
I searched the internet for the past few hours to find everyone dancing around the problem. I’m sure glad I found this, Thanks for the help! Your simple fix is amazing.
This fix failed for me twice. On the third try I restarted the computer after step 2. Then ran step 3 and it worked. I hope this helps others. Thanks
Hi Thanks a lot…this really helped..else i would be stuck at my work place!!!
Hey thanks a lot for this helpful tip. After about 5 attempts i got it to work. This is just a little follow up for the next person that reads it. If you are creating a “database” you will need to input a password and try again. If that doesn’t work, just keep at it until it does, they say third time’s the charm, although mine was the 5th. Good going. Helped a lot, 5 Diamond Stars for you.
thanks, it worked
cool man!! it works like majic!! hats off too you!! thank you soooooooooo much.!!
I just wanted to say THANKS!
Andrei
worked perfect thanks!
Thanks so much. Just what I needed.
This was helpful but did not solve my problem. I tracked my problem down by looking at the error messages in Control Panel –> Administrative Tools –> Event Viewer. The first time I installed MySQL I selected InnoDB storage engine (under wizards ‘Detailed Configuration’) which the error log reported as unsupported. After reconfiguring with the MyISAM storage engine then MySQL service started fine.
Yes it does work, but then I needed to rerun the detailed configuration to get the settings I desired.
when you do this you receive the same error again so whats the point in a detailed config if it always fails?
OK, I followed the instructions above and reran the wiz and still got the “can’t start service” — BUT on a hunch I checked with XP’s Service manager and MySQL was in fact running.
Theory: Between McAfee and dozens of other things, the service does get installed and started but the wiz times out waiting for some confirmation which never comes.
So then I rerun the wiz to REconfigure. When you get to the “old password”, try blank BECAUSE it blew up last time before writing the security stuff, enter the new password you want — probably the same as you put in when it blew up last time.
Finally I’m good…
I’ve tried this several times, searching the entire registry for MYSQL entries, search my entire harddrive for MYSQL files/folders… checked the services.msc for mysql services running. deleted everything related to MYSQL. Some how. I cannot reinstall this thing.
I’ve tried all examples listed. I even searched the web for possible solutions much of them similar to this one. None have worked. I’m starting to think my only recourse is a fully wipe at this point of frustration.
This solution worked for me! I got the error at the end of the MySQL Server Instance Config process. I did NOT close out the MySQL Server Instance Config while searching out a solution/fix. I found this page, followed the suggestions above (use the MySQL Server Instance Config Wizard), then went to my STILL OPEN “MySQL Server Instance Config process”, which was still showing the error (Cannot create Windows Service for MySQL.Error:0), clicked BACK once, and then executed again. Problem Solved!
ah great! it worked thanx : ) next one is 1045 error though..huhu..
cheers : )
Initially it also didn’t work for me, but then,
I changed the name of the service from MySql to MySql5, and then it worked.
Thanks!