How to reset mysql password without old password?

Reset or remove MySQL password

  • I reinstalled MySQL and now it is asking for the current password. Is there a command or method with which I can remove the password?

  • Answer:

    The passwords for MySQL are stored within the "Mysql" database within MySQL itself. They are in the mysql.user table (column "Password"). You would need to move the database files themselves to another location before reinstalling MySQL. If you don't want your existing databases you can just delete the files. I'm not sure where they get put on Windows. The files are *.MYI, *.MYD and *.frm if you want to search for them.

michelle at Super User Visit the source

Was this solution helpful to you?

Other answers

The database(s) are not deleted if you uninstall MySQL. Additionally you have to delete the directory C:\ProgramData\MySQL which contains on Windows 7 systems by default the database files (as long as you don't have specified a custom location). See also: http://superuser.com/questions/225826/how-do-i-completely-uninstall-mysql

Robert

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.