How to retrieve the super user MySQL database password under DOS, the actual operation under Windows is as follows 1. Close the running MySQL;
CMD Open DOS window input net stop MySQL or into service end MySQL run 2. Open the DOS window and go to the Mysql\bin directory; 3. Enter Mysqld-nt--skip-grant-tables. If the message doesn't appear, it's right. 4. Open a DOS window again (because the DOS window is no longer moving), go to the Mysql\bin directory. 5. Go to MySQL Safe mode, that is, when MySQL gets up, you can enter the database command without entering the password:
Mysql-uroot-p log in to MySQL using a blank password 6. Password: > Update mysql.user set Password=password ("123456") where user= "root"; (Don't forget the last semicolon) 7. Refresh permissions (required steps) >flush privileges; 8. Exit > \quit
9. Log out of the system, then enter, open MySQL, use the username root and just set the new password 123456 to login.
B Modify the account password with Mysqladmin
DOS under the Bin folder of MySQL, if you configure the environment variable is not necessary
mysqladmin-uroot-p Old password Password new password (note a space before the new password)
How to modify MySQL password under Windows