1. Open the Service
Win+r input service.msc find MySQL service stop
2. Open cmd into the bin folder of MySQL
Enter Mysqld-nt--skip-grant-tables Direct carriage return, the following similar characters are displayed
140317 13:23:11 [Warning] option ' new ': Boolean value ' t ' wasn ' t recognized. Set
To OFF.
3. Open a DOS window again and go to the Bin folder, enter MySQL direct return
Mysql>use MySQL; Select Database
mysql> UPDATE user SET Password=password ("123456") WHERE user= "root"; Set Database Password
Mysql>flush privileges; Refresh Permissions
9. Exit: (Many of the exit methods are quit, exit, CTRL + C, \q, etc.);
10. Log off or restart your computer, and then turn on the MySQL service to log in using the username root and the new password you set.
This article is from the "high-tech blog" blog, please be sure to keep this source http://gaopengju.blog.51cto.com/12830710/1942714
Hack mysql password on windows