加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

mysql8并解决caching_sha2_password问题客户端登陆时提示:Authenticationplugin'caching_sha2_pass

(2020-06-06 10:46:59)
分类: 数据库类文章
客户端登陆时提示:
Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 2): image not found
说明客户端不支持这种加密方式,因为默认生成的root的密码是用 caching_sha2_password 插件加密的。而客户端找不到 caching_sha2_password 插件,于是登录不上。

我们先通过终端输入:mysql -u root -p登录mysql,然后mysql>use mysql
删除原来账号:
drop user 'test'@'%';
创建新账号:
CREATE USER 'test'@'%' IDENTIFIED WITH mysql_native_password BY '12345678'(按照配置的安全等级来,我配置的0,所以只要满足8位以上就可以了);
grant all on . to test@'%'; 需要给test帐号授权,否则test帐号没任何权限。
以上操作完之后,客户端就可以登录mysql了。

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有