- 查看密码存储模式
select host,user,plugin from mysql.user;
- 修改密码,更改密码模式
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
- 重载表
FLUSH PRIVILEGES;
4.退出重新登录查看是否修改成功
- 备注执行命令的时候一定要加分号「;」
select host,user,plugin from mysql.user;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
FLUSH PRIVILEGES;
4.退出重新登录查看是否修改成功