mysql how to change user password and mysql how to forget password

  • 2020-06-12 10:47:28
  • OfStack

Change password:


// Select database 
use mysql;
// Change the password 
update user set password=password(' The new password ') where user='root';
// Effective immediately 
flush privileges

Forget administrator password:

Add below the [mysqld] field of ES8en.ini:


skip-grant-tables

Restart the mysql service so that mysql does not need a password to log in to the database
Then enter mysql


use mysql;update user set password=password(' The new password ') where user='root';
flush privileges

After running, remove skip-ES25en-ES26en and restart mysql.


Related articles: