Thursday, May 21, 2009

Removing a MySQL Service FROM Windows

After shutting down and removing a MySQL database server from a Windows platform it is important to remember to remove the Windows service associated with it. There are two different ways to remove a MySQL server.
  • MySQL way: c:> mysqld --remove servicename
  • Windows way: c:> sc delete servicename


Anonymous said...

I suppose the reason for this post is that MySQL deinstallation does not remove the service?

Unknown said...

Hi, MySQL does a great job of removing the service. The reason I put this in is once students see how MySQL cleans up services, they ask how they can do that manually on windows with other services. Since I'm always being asked this question, I thought I would show how to delete other services on Windows. I should have made that point clearer in the blog entry. :)

Peter Laursen said...

Third way: use the Regedit program and remove reference to the service in HKLM! However 'sc' command is probably more safe, but less than 1% of Windows users know this option and they will use Regedit because that tool they know!!

btw: a bug report here:

On 64 bit Windows the uninstaller fails to remove the service!