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

#修改加密权限为mysql_native_password
alter user ‘root’@’%’ identified with mysql_native_password by ‘[email protected]’;

root对应user
host对应%
如果要更改的[email protected]不存在就会报如下错误:
ERROR 1396 (HY000): Operation ALTER USER failed for ‘root’@’%’
可以创建这样的用户组,再更改,如果有必要删除原来的:
create user ‘root’@’%’ identified by ‘pwd’;

#查看所有用户,确保无plugin的值为caching_sha2_password
select user,host,plugin from user;

#最后别忘记使之前的更改立即生效
flush privileges;

不想上面那种命令行的方法,可以参考下面的方法

1.系统偏好中最下面,卸载mysql
2.重新安装mysql,在下面这一步必须注意选择第二个:
2059 - Authentication plugin 'caching_sha2_password' cannot be loaded

相关文章:

  • 2021-11-25
  • 2021-08-16
  • 2021-04-05
  • 2022-12-23
  • 2021-11-13
猜你喜欢
  • 2021-11-09
  • 2021-06-18
  • 2021-04-07
  • 2021-12-18
  • 2022-01-21
相关资源
相似解决方案