1) Forgot Password:
Reference: https://www.jb51.net/article/108609.htm
80527069
What if you have forgotten your password?
We can open the/etc/my.cnf file and write it at the bottom of the file:
Skip-grant-tables
Save the exit on it, then remember to restart!!!
Then you can enter without entering the password and then change the password after entering!!!
If you change your password, report this error:
Operation ALTER USER failed for ' root ' @ ' localhost '
or the wrong:
The MySQL server is running with the--skip-grant-tables option so it cannot execute this statement
Don't panic, this is because you use a remote connection, remember that you change the MySQL database user table localhost to% bar, indicating any connection, but not secure,
Just because you changed this, you just change him back: localhost root, and then the command:
ALTER USER "root" @ "localhost" identified by "your new password";
You can, if not, you flush privileges first, and then modify.
2) Print operation log:
3) Add User:
MySQL Use tips