【2059】数据库远程连接,出现2059问题

原因

是由于目前已有的客户端连接软件还不支持Mysql8新增加的加密方式caching_sha2_password,所以我们需要修改用户的加密方式,将其改为老的加密验证方式。

大安装Mysql数据库的主机上登录Mysql对应的用户,上面连接时用的用户为root,所以我们登录root用户。

解决

  • select user,plugin from user where user='root';

可以看到当前用户的加密方式为caching_sha2_password

  • alter user 'root'@'%' identified with mysql_native_password by '你的木马';

将用户的加密方式改为mysql_native_password

  • flush privileges
原文地址:https://www.cnblogs.com/pingguo-softwaretesting/p/9737169.html