How to Uninstall/Clean MySQL from Windows completely?

Important!: Remember to backup any databases before you uninstall MySQL completely don’t say we didn’t warn you

1) Run Command Prompt (Type cmd into the search menu in Windows 8/10) and run it as Administrator and execute the following commands to stop and remove MySQL service.

Step 1: Net stop MySQL
Step 2: SC delete MySQL

The service should now be gone.

2) Go to Control Panel>Programs>Programs and Features, select MySQL Server and click Uninstall. (If you can uninstall MySQL from Control Panel if not just follow the steps below)

3) Open Windows Explorer and go to Organize > Folder and search options, Select the “View” tab and under “Hidden files and Folders” choose “Show hidden files and folders”. Now explore the following locations and delete following folders.

Note: You will need enable “Hidden items” in file manager in order to get to the program data files

C:\Program Files\MySQL
C:\Program Files (x86)\MySQL
And if exists, delete it too

Its also probably worth scanning and fixing the registry for anything that’s been left behind using CCleaner

4) Restart your PC and start installing Maria DB as per these instructions

That’s literally all there is to it you should find MariaDB installs without too much hassle once you’ve got rid of MySQL

Important Please Note: You run this script at your own risk we cannot be held liable for any damages arising from use of this script

We hope you found it easy to do!

Last updated on: 5th June 2018
at 13:49 PM Europe/London