无法加载身份验证插件"caching_sha2_password" [英] Authentication plugin 'caching_sha2_password' cannot be loaded

查看:509
本文介绍了无法加载身份验证插件"caching_sha2_password"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将MySQL-8.0与MySQL Workbench连接,并出现以下错误:

I am connecting MySQL - 8.0 with MySQL Workbench and getting the below error:

身份验证插件"caching_sha2_password"无法加载: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so,2):图片 找不到

Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 2): image not found

我也尝试过使用其他客户端工具.

I have tried with other client tool as well.

有什么解决办法吗?

推荐答案

您可以使用以下Alter命令更改用户,从而更改用户密码的加密方式:

You can change the encryption of the user's password by altering the user with below Alter command :

ALTER USER'username'@'ip_address'用mysql_native_password标识 '密码';

ALTER USER 'username'@'ip_address' IDENTIFIED WITH mysql_native_password BY 'password';

OR

我们可以通过使用旧密码插件来避免此错误:

We can avoid this error by make it work with old password plugin:

首先在Linux的 my.cnf文件/Windows中的my.ini文件中更改身份验证插件:

[mysqld]

[mysqld]

default_authentication_plugin = mysql_native_password

default_authentication_plugin=mysql_native_password

重新启动mysql服务器以影响更改,并尝试通过MySQL与任何mysql客户端连接.

Restart the mysql server to take the changes in affect and try connecting via MySQL with any mysql client.

如果仍然无法连接并出现以下错误:

If still unable to connect and getting the below error:

Unable to load plugin 'caching_sha2_password'

这意味着您的用户需要上述插件.因此,在更改默认插件后,尝试使用create user或grant命令创建新用户.那么新用户需要本机插件,您就可以连接MySQL.

It means your user needs the above plugin. So try creating new user with create user or grant command after changing default plugin. then new user need the native plugin and you will able to connect MySQL.

谢谢

这篇关于无法加载身份验证插件"caching_sha2_password"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆