1、Authentication method 'caching_sha2_password' is not supported.
这个是mysql版本身份验证引起的,
解决:
1.查询user表plugin列的值,是否如下
如果不同请如下操作:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #更新用户的密码
FLUSH PRIVILEGES; #刷新权限
再重置下密码:alter user 'root'@'localhost' identified by '123456';
2.修改配置文件:
把default_authentication_plugin=mysql_native_password添加到配置中。
3.重启即可。