Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I uninstalled MySQL 5.1 from Vista as I lost the username/password, however I forgot to stop the MySQL service before doing so. Now whenever I try to reinstall it I get to the final configuration screen which then fails with the message "Cannot create Windows Service for MySQL Error:0".

I've uninstalled MySQL and removed all related files/folders/registry entries but still no joy...

Does anyone know a way to resolve this as I can't seem to find a fix online anywhere!

share|improve this question

Open up the Services manager (Start -> services.msc) and scroll down to see if there's an entry for MySQL available. If so, double-click on it. Look for an entry at the top of the General Tab called Service name. Make a note of what that name is.

Now open up an elevated Command Prompt. (Start -> Command Prompt, then right-click and Open as Administrator) Run the command: sc delete service_name, where service_name is the service name from the Service manager is the previous paragraph.

That should take care of it for you.

Edit: There are keys in the registry that correspond to this under HKLM\System\CurrentControlSet\Services, but the entries under that key are restricted to SYSTEM access only by default under Vista. Mucking around in there can easily break a system.

share|improve this answer

Unfortunately the MySQL service described by @afrazier was nowhere to be found however I nanaged to resolve this with some further digging.

It turns out that a hidden folder "ProgramData" on the root of my C: drive held a MySQL folder also. Removing this then allowed me to install/start the service without error.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.