执行命令
use mysql;
select user,plugin from user where user=’root’;
可以看到当前用户的加密方式为caching_sha2_password
执行命令
alter user ‘root’@’%’ identified with mysql_native_password by ‘123456’;
flush privileges;
能连接了。
以上 错是由于目前已有的客户端连接软件还不支持Mysql8新增加的加密方式caching_sha2_password,所以我们需要修改用户的加密方式,将其改为老的加密验证方式。
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!