Yesterday, I was installing MySQL in my PC running Windows 7 x64 and suddenly the installation meshed up while configuring post installation settings. I tried to uninstall/re-install it again but couldn’t get success.

Finally I decided to get rid of MySQL manually and followed these steps to uninstall MySQL from Windows completely.

NOTE: The method will remove all database and instances of MySQL, so if you want to save your existing databases, take backup before going through the steps.
How To:

  1. Run Command Prompt as Administrator and execute the following command to stop and remove MySQL service.
  2. Net stop MySQL
    Sc delete MySQL

  3. Go to Control Panel >> Programs >> Programs and Features, select MySQL Server 5.x and click Uninstall. (If you can uninstall MySQL from Control Panel)
  4. 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.
  5. C:\Program Files\MySQL
    C:\Program Files (x86)\MySQL
    C:\ProgramData\MySQL
    And if exists, delete it too
    C:\Users\[User-Name]\AppData\Roaming\MySQL

  6. Restart your PC and reinstall MySQL. That’s all!

Applies To:

  • Windows Server 2008 R2
  • Windows Server 2008
  • Windows 7
  • Windows Vista

8 responses to “How to Uninstall/Clean MySQL from Windows completely”

  1. Moyin Avatar
    Moyin

    i’m trying on windows 2012 R2, its not working. i don’t find anything in these mentioned paths,
    C:\Program Files\MySQL
    C:\Program Files (x86)\MySQL
    C:\ProgramData\MySQL
    And if exists, delete it too
    C:\Users\[User-Name]\AppData\Roaming\MySQL

    don’t know how to fix this.

  2. Ricardo Avatar
    Ricardo

    Thank you so much!!!

  3. Nupur Dhawan Avatar
    Nupur Dhawan

    Thanks alot !! u saved me

  4. sajjad Avatar
    sajjad

    thanks it is very simple solution and its working fine. great

  5. Disque Avatar
    Disque

    It worked for my laptop with windows 7 64 bits, thanks!

  6. chahrazed Avatar
    chahrazed

    I have windows Xp SP2, it’s does’nt work!!!

  7. Fatima Clemene Vergabera Avatar
    Fatima Clemene Vergabera

    I risked changing the password, but I ended up uninstalling it. This post really helped me. Thanks a lot bro! Keep it up!

  8. Sheri Avatar
    Sheri

    thank you so much. I struggled for two days to figure out what’s going wrong during uninstall. thank you

Leave a Reply

Your email address will not be published. Required fields are marked *