How to remove MySQL service from Windows

34

7

I've removed all MySQL programs from my Win7 64bit desktop and I still have the MySQL service.
How can I remove it?

MySQL programs I removed:

  • MySQL Community Server 5.1
  • MySQL Community Server 5.5
  • Workbench 5.2
  • ODBC 5.1

yes, I've restarted the computer twice. yes, I checked program files and the programs are gone

Jonathan

Posted 2011-02-09T22:04:00.503

Reputation: 3 371

Answers

68

You must run the command "sc delete MySQL" where "MySQL" is the name of the service

Anatole BAUDOUIN

Posted 2011-02-09T22:04:00.503

Reputation:

14Need to be done from a command prompt with administrator priviliges – Jonathan – 2011-02-09T22:33:27.227

4

control panel -> administrative tools -> services

Find mysql service, stop it, and set startup type to disabled.

However if you would uninstall mysql correctly it should have removed this service it self. So probably some bug creped out from somewhere.

PS this is not a development related question, it would be more appropriate to ask it superuser.com

Ivan

Posted 2011-02-09T22:04:00.503

Reputation:

That just disables it but doesn't remove it, which will require using the sc command. – Ex Umbris – 2011-02-09T22:09:12.313

2

If at all the above are not working for you, try the installer again and opt for "Remove Instance" in the configuration set up.

dinnu

Posted 2011-02-09T22:04:00.503

Reputation:

2

Before you uninstall MySQL you should always run the "MySQL Server Instance Config Wizard" first. It will give you the option to repair or remove the service.

Choose remove and then unistall MySQL...

Anthony Benavidez

Posted 2011-02-09T22:04:00.503

Reputation: 21

1

Use the sc (service control) command, which can add and remove services, as well as control them.

Ex Umbris

Posted 2011-02-09T22:04:00.503

Reputation: 928

1

mysqld-max-nt.exe -remove or mysqld-nt.exe -remove one of these commands works to remove the service on all Windows operating systems.

remove_windows_service_mysql

Posted 2011-02-09T22:04:00.503

Reputation:

1

Its better to not install MySQL as a Windows service or if already installed simply remove it as a service. There are too many bugs and problems with running MySQL as a Windows service, many of them don't have a resolution because every setup is different and requires a proper fix to how Windows resolves the service. A better way around the problem is to create a bat file for booting it up, then simply add a reference in task scheduler for auto booting.

user215829

Posted 2011-02-09T22:04:00.503

Reputation: 11

Can you give some more information about the problems that could be caused. The way it stands this answer is of low quality. – Simon – 2013-04-10T11:05:21.427

-1

First, you need to run "cmd" as an Administrator, then run the command "sc delete MySQL", then you will get the message "[SC] DeleteService SUCCESS" ;)

Kavinda

Posted 2011-02-09T22:04:00.503

Reputation: 1