I did it according to these tutorials, the URL is as follows
Http://www.pc6.com/infoview/Article_65979.html
Http://down.chinaz.com/server/201111/1414_1.htm
Http://www.myxzy.com/post-93.html
Http://www.cnblogs.com/gogly/p/3293328.html
Let me take a look at the specific steps, and some of the pitfalls of online tutorials:
Before you begin, you must first
1.cmd-----> go to Doc window, enter net stop MySQL
2. My MySQL installation address is D:\mySQL5.0\bin
3. Enter d: Enter D drive
4. Enter CD Mysql5.0\bin to enter this folder
1~4 as follows
5. Next is the key
6. The tutorials I found on the internet say input mysqld--skip-grant-tables, or input mysql.exe--skip-grant-tables, but I tried it.
7. The correct way is to go to this installation package to find the corresponding class, I found that my folder D:\mySQL5.0\bin there are some mysql-debug.exe this file, so I tried to lower the second paragraph of this code, it really can ah!! (Online says this is the equivalent of starting MySQL)
8. Re-enter CMD to open a different doc window:
9 Input D: Enter D drive
10. Enter the CD Mysql5.0\bin into the bin installation package where your database is located.
11. Enter a sentence:mysql-uroot-p (Online said this is the way to enter MySQL)
12. There will be password, casually input it, I entered the 123456, my database password is forgotten, the one I entered casually
13. Modify the database password, enter update mysql.user set password= ' 123456 ' where user= ' root '
14. Close the two doc windows
15.cmd re-entered the Doc window, then re-enter net stop MySQL, in the input net start MySQL, this kind of successfully modified the password
Root password forgot what to do.