Cannot create windows service for mysql error 0

I am getting the following error when I try to configure MySQL instance, could any one help out to resolve this error. I am using Windows XP SP2.

I am getting the following error when I try to configure MySQL instance, could any one help out to resolve this error.

I am using Windows XP SP2.

studiohack's user avatar

asked Nov 9, 2010 at 9:30

mahesh's user avatar

2

If you reinstall or upgrade MySQL without first stopping and removing the existing MySQL service and install MySQL using the MySQL Configuration Wizard, you may see this error:
Error: Cannot create Windows service for MySql. Error: 0

This occurs when the Configuration Wizard tries to install the service and finds an existing service with the same name.

One solution to this problem is to choose a service name other than mysql when using the configuration wizard. This enables the new service to be installed correctly, but leaves the outdated service in place. Although this is harmless, it is best to remove old services that are no longer in use.

To permanently remove the old mysql service, execute the following command as a user with administrative privileges, on the command-line:

shell> sc delete mysql
[SC] DeleteService SUCCESS

If the sc utility is not available for your version of Windows, download the delsrv utility from http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/delsrv-o.asp and use the delsrv mysql syntax.

— http://dev.mysql.com/doc/refman/5.0/en/windows-troubleshooting.html

answered Nov 14, 2010 at 0:32

ajreal's user avatar

ajrealajreal

46.4k10 gold badges86 silver badges119 bronze badges

Usually when the service doesn’t manage to start, there will be more detailed information about what went wrong somewhere:

  • In mySQL’s your_hostname_here.err file

  • In the system’s error log (In english-language Windows, it’s called event log I think)

you need to look there for the reason.

answered Nov 9, 2010 at 9:33

Pekka's user avatar

PekkaPekka

438k140 gold badges968 silver badges1083 bronze badges

Asked
12 years, 9 months ago

Viewed
412 times

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!

asked Apr 24, 2010 at 21:36

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 HKLMSystemCurrentControlSetServices, 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.

answered Apr 24, 2010 at 22:20

afrazier's user avatar

afrazierafrazier

7104 silver badges7 bronze badges

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.

Community's user avatar

answered Apr 25, 2010 at 8:03

Cannot create Windows service for MySQL.Error:0

Platform: Windows People often checks MySQL’s download section and when they notice that there is new version of MySQL released they just can’t wait for a second & starts downloading it so that they can install it on their windows box for testing purpose. Ok fine, download is completed its time to install it. Couple of successful «NEXT» and In the last step they

encounter a error message such as

"Cannot create Windows service for MySQL.Error:0"

We are so intelligent ppl that we don't want to take any help from our colleague..
And what we do is we just delete the directory in which new installation has been done & starts the installation
wizard one-more time in the hope that this time we gonna install it.

Again the result is same "Cannot create Windows service for MySQL.Error:0"

So why are we getting error that too at the last step? one common thought is "there must be something wrong
or some sort of bug in the new release"

How to resolve this error?
The primary reason for this error is that you haven't properly uninstalled the 
previously installed MySQL server & in the installation wizard  last step was
 to create  the service with the name "MySQL" and which has the same name as that 
 of the existing service (default is "MySQL").

Solution for this error is to first stop the service if it is running and then remove 
the service.

C:>NET STOP MYSQL
The MySQL
service is stopping.
The MySQL service was stopped successfully.

Once the service is stopped, it can be removed with the SC utility:
C:>SC DELETE MYSQL

[SC]
DeleteService SUCCESS

With the previous service stopped and removed, you can now run the MySQL Configuration Wizard again to configure and start the new MySQL service.

Понравилась статья? Поделить с друзьями:
  • Camerabin error internal data stream error
  • Camera server error
  • Camera init failed with error 0x20002
  • Camera init failed with error 0x106
  • Camera in use error