CentOS7中的mysql8.0错误处理——Authentication plugin 'caching_sha2_password' cannot be loaded

"Authentication plugin ‘caching_sha2_password’ cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: 无法打开共享对象文件: 没有那个文件或目录 QMYSQL: Unable to connect"

在本机安装MySQL8.0,通过程序中连接数据库时,提示:Authentication plugin ‘caching_sha2_password’ cannot be loaded 的错误,经查看发现,mysql8.0改变了身份验证插件,可以看到变更了 5.7及其以前的方式: mysql_native_password。

解决:
开启mysql,输入:
ALTER USER user_name@localhost IDENTIFIED WITH mysql_native_password BY 'XXXXXX';
user_name及权限根据实际修改。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
CentOS系统MySQL的认证插件'caching_sha2_password'的加载出现了错误错误信息为ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory。 在MySQL 8.0版本,默认的认证插件是'caching_sha2_password'而不是'mysql_native_password'。所以,如果你想在CentOS使用'mysql_native_password'认证插件,可以通过以下步骤进行修改: 1. 进入MySQL命令行界面:mysql -u root -p 2. 使用以下命令修改'root'用户的认证方式为'mysql_native_password':ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'mysqlmysql'; 3. 如果你想修改远程登录的'root'用户的认证方式,可以使用以下命令:ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '******';(其******为你设置的密码) 通过以上步骤,你可以在CentOS将认证插件修改为'mysql_native_password',以解决'caching_sha2_password'插件加载错误的问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [Authentication plugin ‘caching_sha2_password‘ cannot be loaded: /usr/lib64/mysql/plugin/caching_...](https://blog.csdn.net/tianlangstudio/article/details/112754979)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* [extrabackup --backup 报错 failed: Authentication plugin caching_sha2_password cannot be loaded](https://blog.csdn.net/ctypyb2002/article/details/106902258)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值