Sometimes it is really uncomfortable to suddenly forget the MySQL password. here is a method to reset the password when the MySQL password is forgotten. in the operating system win8, MySqlversion: 56101, close mysqlexe in the task manager, mysqldexe process; 2 sometimes it is really uncomfortable to suddenly forget the MySQL password in the MySQL installation folder. here we will introduce a method for resetting the password when the MySQL password is forgotten, operating system win8, MySql version: 5.6.10
1. shut down the mysql.exeand mysqld.exe process in the task manager;
2. open the cmd window (shift + right-click) in the MySQL installation folder)
Enter mysqld-skip-grant-tables as follows:
This probably means skipping the authorization table.
3 Login
At this time, the login password is blank, so press Enter directly when entering the password. The result is as follows:
4. change the password
Update mysql. user set password = password ('XXX') where user = 'root ';
The details are as follows:
5. refresh
After changing the password, remember to refresh the password. Otherwise, wait until the program is closed and the password is logged on again. refresh the password in one sentence:
Flush privileges;
6. restart
Close mysql, mysqld, and restart.