MySQL Error 0 Cannot Create Windows Service

If you are visiting this page, most likely you have seen this on your screen after trying to reinstall MySQL 5.X MySQL Error 0 This is the MySQL Error 0, which usually follows a windows notification that mysqld.exe has stopped working. After reading many forum posts, it appears that there is no definite answer as to how to solve the problem. However, I finally came across a method that worked for me, and hopefully it will work for you. The OS in this scenario is Vista 32-bit.

The Problem

The problem is MySQL did not properly uninstall. Remnants of MySQL still exist on your computer, and the configuration wizard can not create a new MySQL service because of this. An indication of this is the fact that while you were trying to reinstall MySQL, you may have been prompted to enter your "old password." A brand new configuration doesn't ask for this.

The Solution

Step 1)If MySQL is still Installed, run the MySQL Server Instance Config Wizard. (Should be found in your start menu under MySQL) Step 2)Select "Remove Instance". Select Remove Instance Step 3)Click Execute, and once complete, click finish. Step 4)Open the Command Prompt Step 5)Type in
sc delete mysql
into the command prompt. If it fails, that's fine. Delete MySQL Service via Command Prompt Step 6)Uninstall MySQL Server 5.X via the control panel. Step 7)Open the C:\ directory. Open the C:\ Directory Step 8)Make hidden folders visible. You can do this by pressing alt to bring up the menu, then go to Tools -> Folder Options. Click the View Tab, and look for "Hidden files and folders." Then click "Show Hidden Files and Folders". (If you need more guidance on making hidden files visible, you can visit the Microsoft tutorial.) Show Hidden Files Step 9)In you C:\ drive, you will now see a folder named ProgramData that was not visible before. Open it. ProgramData file now visible Step 10)If you see the MySQL Folder, Delete it! Delete the MySQL Folder Step 11)Check the C:\Program Files directory. If you see a MySQL Folder, Delete it! At this point, I was able to run the MSI Installer again and install MySQL normally. March 02, 2010
About the Author:

Joseph is the lead developer of Vert Studios Follow Joseph on Twitter: @Joe_Query
Subscribe to the blog: RSS
Visit Joseph's site: joequery.me