MySQL account password forgotten solution (valid for pro test in windows environment)

(Under Windows environment) MySQL account or password forgotten solution steps The main content of
this article is excerpted from the content of another blogger, and I would like to express my thanks to the original blogger.
The link of the original blogger's article:
http://www.cnblogs.com/jifeng/archive/2011/06/23/2088299.html#3390741
made some supplementary statements about the content of the original blogger, and I hope to make more Good to help everyone. (I use it successfully on windows, and it is estimated that Linux is similar) 1. Close the running MySQL in
windows environment . The specific operation is: ctrl+alt+delete—>Task Manager—>End mysql.exe. 2. The cmd command opens a DOS window and goes to the mysql\bin directory. The specific operation is: ->cd C:\Program Files\MySQL\MySQL Server 5.5\bin (default installation directory, similar to custom directory). 3. Enter mysqld -nt –skip-grant-tables (note that there is a space between mysqld and -nt) 4. Open another DOS window (because the DOS window just now cannot be moved), go to the mysql\bin directory (operation Same as step 2). 5. Enter mysql and press Enter, if successful, the MySQL prompt > will appear. If it is unsuccessful, it may be that mysql.exe is not closed. If it is closed, repeat step 5. 6. Connect to the permission database > use mysql; (> is the original prompt, don't forget the final semicolon)








7. Change the password: > update user set password=password(“123456”) where user=”root”; (don’t forget the semicolon at the end)
7. Refresh privileges (required steps) > flush privileges;
8. Exit > \q
9. Log out of the system, then log in, open MySQL, and log in with the username root and the new password 123456 just set.
10. DOS login: ->mysql -u root -p
->123456
11. Or: Download Navicat for MySQL client, enter 123456 in the password when connecting, test the connection, success!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325934789&siteId=291194637