Mar
11

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”

  • MH August 26, 2009 at 2:23 pm

    Thanks a lot, worked like a charm and saved me hours of frustration! =)

  • darion nguyen August 26, 2009 at 10:45 pm

    Omg man! It worked! Thanks alot. I’ve been setup alot of MySQL on both Windows Server and Linux server at my company but never run into this problem.

  • Emma A. August 28, 2009 at 4:21 am

    Thanks!! It worked for me!

  • Saik August 28, 2009 at 3:11 pm

    Thank You :)

  • lyufer August 29, 2009 at 10:55 pm

    thanks.. men… work this methods

  • Colin August 30, 2009 at 3:03 am

    Looks like half of People listed here with this Problem Failed to fix the Problem using this method. I am One of Those that this DID NOT work for.

    Funny as the version MySQL Version 5.1.37 Essentials worked perfect in a previous install, only difference was the other install was Server 2008 Standard and this one Server 2008 Enterprise.

    Anyone Please Help
    And Post the Solution here for the other 50% of Posters ;-)
    Regards
    Colin

  • Vincent Duvernet August 30, 2009 at 5:50 pm

    i’ve tried another solution without resource hacking.

    After installation, I did not check both checkbox (for configuration & web site).
    I’ve installed in c:\mysql & c:\mysql\data\data (little error on folder selection from me).

    Then launch : MySQLInstanceConfig.exe

    Starting service works (but not last state with error 1045)

  • Shirish August 31, 2009 at 4:52 pm

    Its Works..!.. thanks
    but the error with the “Apply security Settings” >> I used W2k3 server with SP2 and MySQL 6

    Thanks

  • Shirish August 31, 2009 at 5:06 pm

    It also works…
    Thanks

  • Lester September 2, 2009 at 12:38 pm

    Installing MYSQL5.1 for the first time. Installation fails and following instructions does not fix the problem when I delete the first and only instance of the installation. Service will NOT start. I thought this was supposed to be so easy? Even Windows Servers work the first time out. What is the issue here? Any ideas?
    Installing on Vista Ultimate.

  • Shankar Kumar September 2, 2009 at 10:05 pm

    Thanks for this.

  • Kaushik Saha September 3, 2009 at 6:38 pm

    Problem not solved…Same problem occurring.

  • saadatch September 8, 2009 at 2:52 pm

    Thanks a lot, it solves my problem.

    Regards,

    Saadat R.Chaudhry

  • Nathi September 9, 2009 at 5:36 am

    Thank you this worked perfectly…

  • Nikhil September 14, 2009 at 4:16 am

    Thank Lot Buddy this work you are genius :) .

  • inpuffiva September 17, 2009 at 3:04 pm

    instructively put down , hasten to continuing.

  • Tdrox September 17, 2009 at 5:33 pm

    Thanks, easy and strong solution.

    GOD bless

  • Alan September 22, 2009 at 3:02 pm

    Thanks a lot ~~ The problem have drove me crazy until I found this post.

  • Pradeep September 26, 2009 at 11:41 pm

    It worked for me.Thats really great!!!

  • simko September 27, 2009 at 5:17 pm

    Thanks a lot :)

  • Marc October 30, 2009 at 4:11 am

    It worked for me.
    1000 kisses.

  • marjon November 7, 2009 at 8:44 pm

    it works!!!!! thanks a lot muah…..

  • Shie November 16, 2009 at 7:19 am

    Once I get to the point where all it has to do is “Start service” in the installation, the program stops responding.

  • Atta Sumalani November 28, 2009 at 1:00 am

    the easiest way is to delete the service without uninstalling mysql, simply go to the command prompt and type “sc delete mysql” and then start the config wizard, it will workout just fine.

    MAKE YOUR LIFE EASY MAN….

  • Simon December 7, 2009 at 9:50 pm

    Didn’t work for me the first couple of times.

    Then it finally worked but only after I used Detailed Configuration (not Standard).

  • Totally Frustrated MySQL Newbie December 8, 2009 at 12:19 am

    This MySQL installation is a pile of garbage.
    I can’t believe how many people have had this error and still there is not one of the solutions posted that actually work for me. Don’t these developers take their target user-base seriously? If this was commercial software the company would be out of business and we’d all have another solution from competent developers that actually worked.

  • Martin December 27, 2009 at 11:52 pm

    PROBLEM SOLVED: i have IIS7, PHP 5.3 and MYSQL 5.5. installed on my windows 2008 server.

    1. UNINSTAL YOUR PHP AND DELETE DIR.
    2. STOP THE MYSQL SERVICE- remove instance, AND UNINSTALL – windows uninstall
    3. DELETE EVERY mysql dll file ON YOUR HARD DRIVE
    4. START UP REGEDIT AND SEARCH FOR MYSQL, DELETE EVERY KEY THAT POINTS TO MYSQL.
    5. REBOOT COMPUTER
    The most important steps:
    6. FIRST INSTALL MYSQL, USE STANDARD CONFIGURATION !!!!
    7. THEN INSTAL PHP AFTER MYSQL

    IT SEEMS THAT PHP BLOCKS MYSQL SERVICE WITH ITS OWN ONES.

    Hope it helps.

  • Superrookie December 29, 2009 at 10:28 am

    I had problem the same problem after installing Visualstudio8 and downgrading PHP5.3 to PHP5.29

    Had tried above suggestion but didn’t work,

    Anyway, finally, I got a solution.

    1. Uninstall PHP5 (

    2. Run “MySQL Server Instance… configuration ”

    3. Remove instance

    4. Run “MySQL server… Configuration” again

    5. Choose “Detail confi…”

    6. Next , Next

    7. At “InnoDB telespace… setting” ., choose “Modify” and brows a folder containing your DB part.

    8. Click next until finish.

  • no1 January 26, 2010 at 10:14 pm

    fuucking shiit this worked, i cant belive how much time i spent with this problem. Ty man xD

  • Joe L January 30, 2010 at 12:35 am

    Thanks for the info :-)

  • Ruchi February 3, 2010 at 10:15 pm

    Thx a lot..It worked for me in one shot…

  • Shishir February 8, 2010 at 7:29 am

    Hi,
    I had the same problem, but unfortunately above instruction did not work for me.
    Then I cleared every register value of “MySQL” from “regedit” and re-installed the program. Then it worked for me.

  • newer February 12, 2010 at 9:47 am

    THANK YOU SO MUCH .. andy18

  • Mahaveer Singh DELHI March 8, 2010 at 4:30 pm

    GURANTEED SOLUTION- IT WORKS

    MYSQL service creates a process called “mysqld.exe”- which you can locate under the running processes of task manager. If MYSQL service is not running you will not be able to find the “mysqld.exe” in processes list- under task manager.

    To check whats wrong with the MYSQL service use this command:
    mysqld –console. this command should be run from the bin directory of installed MYSQL .

    Go to the c:\program files\ mysql\ mysql server 5.1\ bin > directrory and run the command mysqld –console. plz see the screenshot. “This command will tell you anything wrong with the MYSQL SERVICE”.

    screenshot :

    C:\Program Files\MySQL\MySQL Server 5.1>cd bin

    C:\Program Files\MySQL\MySQL Server 5.1\bin>mysqld –console
    100305 19:40:12 [Note] Plugin ‘FEDERATED’ is disabled.
    InnoDB: Error: log file .\ib_logfile0 is of different size 0 36700160 bytes
    InnoDB: than specified in the .cnf file 0 10485760 bytes!
    100305 19:40:12 [ERROR] Plugin ‘InnoDB’ init function returned error.
    100305 19:40:12 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.

    100305 19:40:12 [ERROR] Unknown/unsupported table type: INNODB
    100305 19:40:12 [ERROR] Aborting

    100305 19:40:12 [Note] mysqld: Shutdown complete

    in this case the ib_logfile0 file was bigger then the predfined size.

    Solution : is to delete ib_logfile0 and ib_logfile1 files from the C:\Program Files\MySQL\MySQL Server 5.1\data folder and then try to restart the MYSQL service manually. the MYSQL Service wil come up and you will see mysqld.exe process running under process list.
    IF YOU GET THE SAME ERROR IN COMAND PROMPT AFTER RUNNING THIS COMMAND THEN U DONT HAVE TO SEARCH NYTHING JUST APPLY THIS SOLUTION N IT WILL WORK .

    try to log in using MYSQL ADMINISTRATOR , it will work and if not then configure a new instance and this time it will allow you to create a new instance sucessfully.

    NOTE:IF YOUR MYSQL SERVICE NOT RUNNING OR FAILING ->RUN THE “MYSQLD — CONSOLE” COMMAND IN THE GIVEN DIRECTORY ONLY AND IT WILL SHOW YOU THE ERROR YOUR MYSQL SERVICE IS CONTAING. N WHATEVER ERROR YOU GET IN THE COMMAND PROMPT – SERACH THAT ERROR ON GOOGLE. COZ THERE CAN BE DIFFERENT ERRORS WITH MY SQL SERVICE. MYSQLD — CONSOLE COMMAND WILL GIVE YOU THE RIGHT DIRECTION TO TROUBLESHOOT.

    NOTE ; IF YOU PLAN TO UNINSTALL YOUR MYSQL THEN FIRST STOP THE MYSQL SERVICE FROM SERVICES.MSC IN START – RUN – CMD ,,,,, AND ALSO MAKE SURE U DELETE IT FROM ADD/REMOVE PROGRAMS AND MANUALLY DELETE FROM C:\PROGRAM FILES\ MYSQL SERVER. AND MAKE SURE U RUN “REGEDIT” TO CONFIRM THAT THE MYSQL SERVICE IS REMOVED.

  • myca April 3, 2010 at 1:02 am

    Hi!! I wanted to say disabling anti-virus and firewalls worked for me.

  • Iruel865 April 5, 2010 at 3:07 am

    Thanks Man!! it worked perfectly!

  • Umashankar Adha April 9, 2010 at 8:04 pm

    Thanks a Lot. ….!!
    Its work for me too.

  • Henry April 15, 2010 at 10:39 am

    hey,man,thanks a lot !

  • esena April 19, 2010 at 12:04 am

    Thanks a lot! It really helped me!

  • john May 18, 2010 at 5:19 am

    There is NO remove instance option in the instance config wizzard. The service NAME (registry entries) exists and no way to get it out.

  • Jansen May 19, 2010 at 12:05 pm

    Thanks man ! Thats was great.

  • Michael May 20, 2010 at 11:15 pm

    It didn’t work right off the bat for me, but this was a good guideline for me to figure out the issue. Thanks!

  • Rohan May 23, 2010 at 5:58 pm

    Hey thnks a lot.. worked for me.. :)

  • bandras May 28, 2010 at 5:37 pm

    Martin, your solution helped me! Thanks a lot!
    Anyway, detailed config also worked after reinstall.

  • Immune June 16, 2010 at 11:10 pm

    Oh shit, man. Thank you andy18! It worked for me! But I had another problem, but solved it out. I did exactly what you said, but it stopped on applying security settings. I thought that I did all of that perfectly. Problem was that I typed “root” in current password. I thought that if I removed the old MySQL instalation and installed the new one, it will need the standard password “root”. I was wrong. It needed the password that I typed when previously installed my MySQL. Now everything works fine. Thank you again.

    Regards.

  • Adeola June 22, 2010 at 4:11 pm

    Thanx a million! It works well

  • MS July 12, 2010 at 9:13 pm

    Thanks for that. Got through with the installation.

  • siva July 23, 2010 at 12:11 pm

    Good..Saved my time.

  • Hedman July 26, 2010 at 4:38 pm

    Tanks finally I got my site to work!!!

Post comment