What steps do I need to take to completely uninstall MySQL?

20

10

I have installed and uninstalled MySQL Server for about 100 times. Each time I reinstall the thing, it shows the same configurations, which I think cause problems. I would like to get rid of all traces of MySQL and install it as if it was the first installation.

I'v already deleted the MySQL folder, but I'm still having the same problem.

How can I start over and reinstall MySQL?

EDIT: My OS is Windows 7.

snakile

Posted 2010-12-26T12:42:00.637

Reputation: 1 299

I have the same problem with Windows XP, and the solution suggested did NOT solve it. Can anyone help? – Amir Rachum – 2010-12-29T18:52:45.823

@Amir - Check the All Users\Application Data folder. – afrazier – 2010-12-29T19:02:02.093

@afrazier did it, doesn't help. – Amir Rachum – 2010-12-29T19:04:56.130

Answers

25

Found a solution on Server Fault: How can I reset the password for MySQL?

Using Windows 7, here's what I had to do:

  • Uninstall MySQL using the uninstaller
  • Delete C:\Program Files\MySQL
  • Delete C:\Program Files (x86)\MySQL
  • Delete C:\ProgramData\MySQL
  • Delete from any Users' AppData folders. Example: C:\Users\rdoverby\AppData\Roaming\MySQL
  • Reinstall MySQL

snakile

Posted 2010-12-26T12:42:00.637

Reputation: 1 299

3Configuration and Data may also be stored in C:\Documents and Settings\All Users\Application Data\MySQL on XP, or C:\ProgramData\MySQL on Vista/7 – afrazier – 2010-12-29T19:01:46.477

1

The ProgramData folder referred to in the first answer is a hidden folder. To view the hidden folder and find some additional MySQL files that you need to delete, follow the instructions here.

– None – 2012-01-18T05:43:06.677

Also useful: Open regedit and delete all values, keys and data from the registry which contain "MySql" (search with Ctrl+F). – Cosmin – 2013-06-06T14:52:08.737

Actually using the installer product from Oracle/MySQL actually removed all the instances I could see and allowed me to specify a brand new password on reintalling MySQL Server – Coops – 2013-11-26T12:37:18.310

3

To ensure that everything is gone, I would :

  1. Use Revo Uninstaller Freeware to uninstall MySQL
  2. Install Agent Ransack and search for all occurrences on disk of "mysql", ".cnf" and ".conf" files and directories
  3. Use regedit and search for "mysql"

Note down the directories and registry keys that you find, and then construct yourself a batch file that will do the cleanup of all the leftovers.

harrymc

Posted 2010-12-26T12:42:00.637

Reputation: 306 093

3

If you installed MySQL as a service then you may want to delete that service as well.

  • Makes sure the service is stopped (should be if you uninstalled already)
  • open a command prompt as administrator (start menu, search "cmd", right-click on cmd.exe, run as administrator)
  • run sc delete MYSQL from the command prompt. (Replace MYSQL with the name of your service)
  • open services menu and check

rob2universe

Posted 2010-12-26T12:42:00.637

Reputation: 131

1

MySQL stores configurations in a file named my.cnf (probably called my.config on windows) try searching it on you system and deleting it.
It is usually located somewhere in /usr/local/mysql or /usr/local/var

Shekhar

Posted 2010-12-26T12:42:00.637

Reputation: 4 815

Then it might be my.config on Windows – Shekhar – 2010-12-26T12:57:02.413