系统环境:centos7
use mysql;
select Host,user,authentication_string,plugin from user;
发现了这个!!! 在我初始化root用户的时候,被无良博主坑了,把所有用户的plugin都换成了mysql5.7的插件“mysql_native_password”
而最新的mysql8.0的密码插件是caching_sha2_password
根据观察$A 005 005 005是caching_sha2_password这个插件加密出来的密码的头段
更新两条数据的plugin
update user set plugin = 'caching_sha2_password' where user='mysql.sys' or user='mysql.infoschema';
exit
重启数据库 sudo systemctl restart mysqld
查看mysql状态systemctl status mysqld