Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

(I realize there are similarly-titled questions, but this one is really 'how do I reset the password', and this one doesn't specify an OS and has only gotten Linux-oriented answers.)

On Windows XP, I just uninstalled MySQL and deleted the folder that it was installed in. I then rebooted and reinstalled MySQL.

When it comes back up, it still has the databases it had before the uninstall.

Where did it keep that database info? How do I completely remove MySQL and start over, as if I'd never installed it?

share|improve this question
    
This seems to be a pretty big frustration for MySQL admins - their forums are stuffed with questions about this issue, from the past several years. –  weiji Aug 27 '10 at 23:54

6 Answers 6

One thing not mentioned, or I just didn't see is that for a windows server you should also remove the folders from appdata below is the example of an administrator user folder to remove from :

C:\Users\Administrator\AppData\Roaming\MySQL

share|improve this answer
up vote 13 down vote accepted

Figured it out

To fully remove MySQL, you have to remove the data folder, too, which is where the database info is actually stored.

It turns out that the "Typical" installation option (on Windows XP) puts the data in "C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1".

After deleting that folder, I was able to reinstall from scratch.

share|improve this answer
    
This was a godsend! I was stuck trying to reinstall, and after many google searches failing to turn up anything, I came across this and it worked for my Windows Server 2008 + MySQL 5.1.46 setup. Thanks! –  weiji Aug 27 '10 at 23:55
    
there is no such thing as Documents and Settings root folder in windows server 2012 though –  abbood Mar 5 at 12:37

All i did was search for folders and files with the name "MySQL" and deleted them all. After that I had no old files at all and could start from scratch again.

share|improve this answer

The data folder was placed here for me, I'm running windows 7 64bit.

C:\ProgramData\MySQL

share|improve this answer

For the benefit of anyone else arriving here looking for the answer, here's a more generic means of locating it, especially if MySQL has been installed somewhere other than the default location (something I'm prone to do).

Searching each of the local drives for "mysql", which will locate both the program and data folders, as "mysql" forms part of the executable name, regardless of version, and there will always be a "mysql" table.

The log files may be in a different location altogether and the best way to locate those is through the config file, which on Windows will normally be named "my.ini". However, if someone has created this installation from source that file could potentially be called anything at all but that would definitely be an unusual case.

Ideally you should uninstall the conventional way (add/remove programs or whatever Microsoft has named it this week) first but if for some reason you're just going to delete everything don't forget to stop the MySQl service(s) first.

share|improve this answer

For Windows 7, it's in ProgramData\MySQL

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.