mysql出现2058,连接MySQL报“Error No.2058 Plugin caching_sha2_password could not be loaded”
·
问题重现
使用sqlyog连接linux系统下docker中的mysql8.0.11时报错plugin caching_sha2_password could not be loaded

问题原因
MySQL8.0新版默认使用caching_sha2_password作为身份验证插件,而旧版是使用mysql_native_password
而sqlyog默认是使用mysql_native_password去进行身份验证,所以这里会报错
问题解决
所以我们去Linux系统下docker中的mysql中修改验证方式就可以了
-
使用命令行登录mysql
mysql -u root -p -
查看各个用户名当前使用的身份验证插件
select Host,User,plugin from mysql.user;
-
修改root用户的本地和远程客户端连接的身份验证插件
这里的123456为你的mysql登录密码
本地连接
alter user root@localhost identified with mysql_native_password by '123456'; FLUSH PRIVILEGES;远程连接
alter user root@'%' identified with mysql_native_password by '123456'; FLUSH PRIVILEGES; -
此时再次通过客户端登录mysql,问题解决,一切正常
测试

更多推荐

所有评论(0)