First step: Turn off the MySQL service.
Step two: Open the DOS window and enter the directory where Mqsql is installed: C:\Program files\mysql\mysql Server 5.6\bin
Step three: In the Command window, enter: Mysqld--skip-grant-tables enter. --skip-grant-tables means skipping permission table authentication when starting the MySQL service.
Occurs because the MySQL service is not turned off. Turn off service re-enter command.
and kill-term mysqld
Fourth step: Open a DOS window again (because the DOS window just can't move), go to ... \mysql\bin directory.
Fifth step: Enter MySQL return, if successful, the MySQL prompt > will appear.
Sixth step: Connection rights database: use MySQL;. Change Password: Update user set Password=password ("Dbdh") where user= "root";
Seventh Step: Refresh Permissions
Flush privileges;
Eighth step: Quit quit.
Nineth Step: Kill mysqld Process start MySQL re-enter the user name and password.
Copyright for all, if you need to reprint please indicate the source.
Http://www.cnblogs.com/northeastTycoon/p/5521683.html
MySQL Forgot Password Solution