Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

 
discard

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