本地MySQL安装版本较新,用Naviact连接时报错【ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password’ cannot be loaded: ÕÒ²»µ½Ö¸¶¨µÄÄ£¿é¡£.】
mysql服务本机登录无异常。登录后先验证了root用户的权限(我用的root远程登录);
查看root用户权限:show grants;
如果没有设置权限,就要登录设置一下,
grant all PRIVILEGES on *.* to 'root'@'%' identified by 'qwer' with grant option;
以上命令具体含义可参考:https://blog.youkuaiyun.com/tjcyjd/article/details/52195883
这里有一个坑!!! 新版MYSQL(8.0之后) 将用户创建和权限赋予这两项分开来了,所以像之前版本mysql的赋权操作会报错
【.....near ‘identified by ‘password” at line 1】
所以需要将这两步分开下:
创建账户: create user ‘用户名’@’访问主机’ identified by ‘密码’;
赋予