Mysql forced to change passwords

 

windows:

1. Stop MYSQL service, open CMD DOS window, enter STOP MySQL NET 
2, the CMD command prompt, enter the MYSQL installation directory such as E: \ Program Files \ MySQL \  MySQL Server 5.0 \ bin
demonstration command: 
Enter the e: Enter, 
enter cd "E: \ Program Files \  MySQL \ MySQL Server 5.0 \ bin"
Note the double quotation marks should be entered, so that you can enter a Mysql installation directory. 
3, enter mysql safe mode, that is, when the mysql up without entering a password You can enter the database. 
Command: mysqld -nt --skip-grant-tables (! Attention -nt preceding space)
4, re-open a CMD command line window, type mysql -u root -p, use a blank password to log MySQL (without input password, press enter) 
5, an input command to begin modifying the root password (Note: the middle of a command mysql.user "points") 
MySQL> Update mysql.user SET password = pASSWORD ( 'new password') where = the User 'root'; 
6, refresh authority table 
MySQL> flush privileges; 
7, exit 
mysql> quit 
this MYSQL ROOT super administrator account has been re-set, the next in the task Manager to end off this mysql-nt.exe process, restart MYSQL you can! (You can also directly restart the server) 
After the restart MYSQL, you can log in with MYSQL ROOT password newly set up! 

If errors are reported, cancellation under the machine.

 

 

 

 

 

Original: https: //www.cnblogs.com/mumue/p/3816185.html

Guess you like

Origin www.cnblogs.com/Chiler/p/11350451.html