本文翻译自:Authentication plugin 'caching_sha2_password' cannot be loaded

I am connecting MySQL - 8.0 with MySQL Workbench and getting the below error: 我正在将MySQL-8.0与MySQL Workbench连接起来并出现以下错误:

Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 2): image not found 无法加载身份验证插件“ caching_sha2_password”:dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so,2):找不到映像

I have tried with other client tool as well. 我也尝试过使用其他客户端工具。

Any solution for this? 有什么解决办法吗?


#1楼

参考:https://stackoom.com/question/3KPnD/无法加载身份验证插件-caching-sha-password


#2楼

You can change the encryption of the user's password by altering the user with below Alter command : 您可以使用下面的Alter命令更改用户,从而更改用户密码的加密:

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

OR 要么

We can avoid this error by make it work with old password plugin: 我们可以通过使用旧密码插件来避免此错误:

First change the authentication plugin in my.cnf file for Linux / my.ini file in Windows : 首先在Windows中的Linux / my.ini文件的my.cnf文件中更改身份验证插件:

[mysqld] [mysqld]

default_authentication_plugin=mysql_native_password default_authentication_plugin = mysql_native_password

Restart the mysql server to take the changes in affect and try connecting via MySQL with any mysql client. 重新启动mysql服务器以影响更改,并尝试通过MySQL与任何mysql客户端连接。

If still unable to connect and getting the below error: 如果仍然无法连接并出现以下错误:

Unable to load plugin 'caching_sha2_password'

It means your user needs the above plugin. 这意味着您的用户需要上述插件。 So try creating new user with create user or grant command after changing default plugin. 因此,尝试在更改默认插件后使用create user或grant命令创建新用户。 then new user need the native plugin and you will able to connect MySQL. 那么新用户需要本机插件,您就可以连接MySQL。

Thanks 谢谢


#3楼

您可以像这样更改密码的加密。

ALTER USER 'yourusername'@'localhost' IDENTIFIED WITH mysql_native_password BY 'youpassword';

#4楼

like this? 像这样?

docker run -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -d mysql --default-authentication-plugin=mysql_native_password
mysql -uroot --protocol tcp

Try in PWD 尝试PWD

https://github.com/GitHub30/docs/blob/change-default_authentication_plugin/mysql/stack.yml https://github.com/GitHub30/docs/blob/change-default_authentication_plugin/mysql/stack.yml

or You shoud use MySQL Workbench 8.0.11. 或者您应该使用MySQL Workbench 8.0.11。


#5楼

Note: For MAC OS 注意:对于MAC OS

  1. Open MySQL from System Preferences > Initialize Database > 从“系统偏好设置”>“初始化数据库”>“打开MySQL”
  2. Type your new password. 输入您的新密码。
  3. Choose 'Use legacy password' 选择“使用旧密码”
  4. Start the Server again. 再次启动服务器。
  5. Now connect the MySQL Workbench 现在连接MySQL Workbench


#6楼

Currently (on 2018/04/23), you need to download a development release . 当前(在2018/04/23上),您需要下载开发版本 The GA ones do not work. GA的无效。

I was not able to connect with the latest GA version (6.3.10). 我无法连接到最新的GA版本(6.3.10)。

It worked with mysql-workbench-community-8.0.11-rc-winx64.msi (from https://dev.mysql.com/downloads/workbench/ , tab Development Releases ). 它与mysql-workbench-community-8.0.11-rc-winx64.msi (来自https://dev.mysql.com/downloads/workbench/ , mysql-workbench-community-8.0.11-rc-winx64.msi Development Releases中 )。

无法加载身份验证插件“ caching_sha2_password”相关推荐

  1. mysql密码认证插件_关于mysql:无法加载身份验证插件’caching_sha2_password’

    我正在将MySQL-8.0与MySQL Workbench连接起来并出现以下错误: Authentication plugin 'caching_sha2_password' cannot be lo ...

  2. 【亲自验证】Navicat连接MySql提示无法加载身份验证插件“缓存_sha2_密码”?

    Navicat连接MySql提示无法加载身份验证插件"缓存_sha2_密码" [1]首先登录MySql(见下图) [2]管理员身份运行CMD(见下图) [3]如图所示 [4]Nav ...

  3. mysql8.0 无法加载身份验证插件“缓存_sha2_密码” 问题解决方法

    一. 在mysql8.0当中对登录密码的认证进行了增强: 由原来的"mysql_native_password"改为"caching_sha2_password" ...

  4. 浅谈 MySQL 新的身份验证插件 caching_sha2_password

    GreatSQL社区原创内容未经授权不得随意使用,转载请联系小编并注明来源. GreatSQL是MySQL的国产分支版本,使用上与MySQL一致. 介绍 从 MySQL 8.0.4 开始,MySQL ...

  5. mysql5.7修改默认密码策略(需加载密码验证插件)

    mysql 5.6对密码的强度进行了加强,推出了validate_password 插件.支持密码的强度要求. 此插件要求版本:5.6.6 以上版本 此插件是默认安装好的,但是你得启用它数据库中才能查 ...

  6. 【得物技术】MySQL 8.0:新的身份验证插件(caching_sha2_password)

    从 MySQL 8.0.4 开始,默认身份验证插件从 mysql_native_password 更改为 caching_sha2_password.相应地,现在的 libmysqlclient 将使 ...

  7. MySQL8.0新特性——默认使用caching_sha2_password作为身份验证插件

    mysql5.8开始将caching_sha2_password作为默认的身份验证插件 该caching_sha2_password和 sha256_password认证插件提供比mysql_nati ...

  8. mysql sha256函数_MySQL8.0新特性——默认使用caching_sha2_password作为身份验证插件

    mysql5.8开始将caching_sha2_password作为默认的身份验证插件 该caching_sha2_password和 sha256_password认证插件提供比mysql_nati ...

  9. 29.类加载机制、类加载过程、加载、验证、准备、解析、初始化、总结

    29.类加载机制 29.1.类加载过程 类从被加载到虚拟机内存中开始,到卸载出内存为止,它的整个生命周期包括:加载.验证.准备.解析.初始化.使用和卸载七个阶段.它们开始的顺序如下图所示: 其中类加载 ...

最新文章

  1. centos7下安装docker(14安装docker machine​)
  2. java excel读取操作,Java 操作 Excel (读取Excel2003 2007,Poi兑现)
  3. 修改类的命名空间引发的发布问题
  4. ResizeObserver - 元素resize监听API
  5. 机器学习笔记 invariance data augmentation
  6. C# WebAPI中DateTime类型字段在使用微软自带的方法转json格式后默认含T的解决办法...
  7. mPaas-RPC拦截器各种场景下的使用指南
  8. php service 函数,PHP 获取 web service 的相关函数及字段
  9. linux .run文件_Linux快捷键及目录结构
  10. 按clear按钮清空两个文本框的内容,按copy按钮时将Source文本框的内容复制到Target文本框,按close按钮结束程序的运行
  11. [jquery视频教程 初级+高级][25课程]
  12. 个人微信api接口调用,拉取微信朋友圈、发朋友圈
  13. 免校准的电量计量芯片_应物联网而生:合力为HLW8012系列免校准电能计量芯片-测试测量-与非网...
  14. matlab 添加断点,matlab设置断点
  15. an ancestor violates the following Content Security Policy directive: “frame-ancestors ‘none‘”.
  16. 算法工程师的能力素质模型
  17. 耳穴减肥自身感受细节描述0422
  18. HTML基础-DAY1
  19. Sqlite 索引的使用、索引的优缺点
  20. Elastic-Job简介和理解

热门文章

  1. 先说一下JS的获取方法,其要比JQUERY的方法麻烦很多,后面以JQUERY的方法作对比。...
  2. html5 Canvas画图3:1像素线条模糊问题
  3. Hobo 4: Total War
  4. 这些测试细节,你注意到了吗?
  5. Test for open live write
  6. zabbix自动发现,端口 url检测
  7. Apache常见配置及问题
  8. 详解ifconfig命令
  9. VBS操作Excel数据
  10. 【Hive】Hive的三种交互方式