12

I have an old MySQL installation for which I do not have the password. How can I reset the password? My first idea was to completely remove it and reinstall with a new password.

I am using Windows Vista.

0

9 Answers 9

11

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

  1. Uninstsall MySQL using the uninstaller.
  2. Delete C:\Program Files\MySQL
  3. Delete C:\Program Files (x86)\MySQL
  4. Delete C:\ProgramData\MySQL
  5. Delete from any Users' AppData folders. Example: C:\Users\rdoverby\AppData\Roaming\MySQL
  6. Reinstall MySQL
3
  • This doesn't work for me with Windows XP. Any ideas? Dec 29, 2010 at 11:33
  • 1
    40 Firefox tabs open before finding this simple answer.. Mar 22, 2012 at 1:47
  • thank you, worked for me
    – Thor
    Apr 24, 2020 at 3:35
6

lg's answer is correct. One additional hint:

You can reset the root PW without reinstalling MySQL. See the documentation:

B.5.4.1. How to Reset the Root Password

4

Uninstall MySql server from control panel and then delete the "data" directory. Usually the "data" directory is at the same level of "bin" directory (\Program Files\Mysql\Mysql Server 5.x\data). The user and root password are stored in the mysql database (data\mysql).

2

I too was having the same issue. I uninstalled MySQL, removed the folder (C:\mysql in my case). Open Windows Explorer and goto Tools. Select the "View" tab and under "Hidden files and Folders" choose "Show hidden files and folders".

Now navigate to C:\Documents and Settings\All Users\Application Data. There should be a MySQL folder in there. Delete it and reinstall. Worked fine for me after that.

1

to re install mysql (caused me alot of trouble and nothing in the postings seemed to help so i tried it hard till i got it right)

  1. stop and remove service using the mysql config wizzard OR ControlPanel/ stop MYSQL (then cmd prompt c:\sc delete mysql)
  2. Uninstall mysql using Add/remove programs
  3. Delete the 2 installations folders as below:- a. c:\Mysql data files folder b. c:\docs and settings\all users\application data\ Mysql

restart if u fill like but not mandatory

Reinstall and enjoy!!!!

1

If you have problems uninstalling MySQLServer 5.5(mysql-5.5.9-win32.msi) in Windows 7, there are 4 easy steps.

  1. Run C:\Program Files\MySQL\MySQL Server 5.5\bin\MySQLInstanceConfig.exe >> NEXT>> REMOVE Instance>> NEXT>> EXECUTE>> FINISH

  2. Run MySQLServer Installer 5.5(mysql-5.5.9-win32.msi) >> NEXT>> REMOVE>> REMOVE>> OK>> FINISH

  3. Delete the folder C:\Program Files\MySQL

  4. Delete the folder C:\ProgramData\MySQL

REINSTALL MySQLServer 5.5(mysql-5.5.9-win32.msi) - With NEW PASSWORD...

hopefully useful..work 100%

This is actually will remove all the MySQL modules installed on your computer. If you want to remove a specific module, can be done this way: 1. same as above 2. Run MySQLServer Installer 5.5(mysql-5.5.9-win32.msi) >> NEXT>> REMOVE >> just remove the specific module ie: MySQL Server. 3. Delete the folder of the module you want to delete ie: C:\Program Files\MySQL\ 4. No need to delete C:\ProgramData\MySQL since it will be overwritten by step 5 5. Reinstall the module using the .msi file.

Hope this helps more ;)

0

I've tried both unistalling and deleting the whole MySQL folder (plus a search for any file with "mysql" in the name just to be sure), and the root PW reset from the doc, and neither work. When I delete and reinstall the configuration is still there, as the only option in setup is "modify security settings" which requires an existing password, and skipping that I can't log in to my new install. I tried the init-file trick and it just hung for several minutes until I canceled the operation. So, any other ideas?

1
  • 1
    I found the answer here: channels.com/episodes/show/6310023/… There was also a folder hidden in Program Data that I didn't get. BTW this was on Win7 Pro
    – Anonymous
    Feb 17, 2010 at 3:35
0

If you are having problem uninstalling mysql in win 7

step1) Uninstall mysql from control panel >> add remove program

step 2) remove mysql folder from 1) program files 2) c:\programdata

Now try to Install it again.

You will get an option to reconfigure the mysql service while install mysql there will an option to stop and remove the mysql service.

Once you do this...try step 1 and 2 again

Do an installation again

and Voila it will work!!

0
  1. First ‘Uninstall’ mysql from the Control panel.
  2. Then, remove the “C:\Program Files\MySQL” folder.
  3. Delete the mysql service my using command in command prompt “Sc delete mysql”
  4. Then, remove the “C:\Users\pc\AppData\RoaminMySql” folder.
  5. Again Reinstall a fresh copy….It will Work !!!

Not the answer you're looking for? Browse other questions tagged .