无法加载身份验证插件“caching_sha2_password"

Authentication plugin #39;caching_sha2_password#39; cannot be loaded(无法加载身份验证插件“caching_sha2_password)
本文介绍了无法加载身份验证插件“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): image未找到

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' IDENTIFIED WITH mysql_native_password BY'密码';

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

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

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

首先更改Linux的my.cnf文件/Windows的my.ini文件中的认证插件:

First change the authentication plugin in my.cnf file for Linux / my.ini file in Windows:

[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"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)
MySQL GROUP BY DateTime +/- 3 seconds(MySQL GROUP BY DateTime +/- 3 秒)