先通过命令行进入mysql的root账户:
更改加密方式
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
更改密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
刷新
FLUSH PRIVILEGES;
标签:加密,更改,mysql8,USER,password,root
From: https://www.cnblogs.com/qcy-blog/p/17835513.html