我正在连接MySQL - 8.0与MySQL工作台和得到以下错误:
无法加载认证插件“caching_sha2_password”: dlopen (/ usr /地方/ mysql / lib /插件/ caching_sha2_password。所以,2):图像 没有找到
我也尝试过其他客户端工具。
有什么解决办法吗?
我正在连接MySQL - 8.0与MySQL工作台和得到以下错误:
无法加载认证插件“caching_sha2_password”: dlopen (/ usr /地方/ mysql / lib /插件/ caching_sha2_password。所以,2):图像 没有找到
我也尝试过其他客户端工具。
有什么解决办法吗?
当前回答
目前(2018/04/23),您需要下载开发版本。GA的不工作。
我无法连接到最新的GA版本(6.3.10)。
它适用于mysql-workbench-community-8.0.11-rc-winx64。msi(来自https://dev.mysql.com/downloads/workbench/,选项卡Development Releases)。
其他回答
注意:适用于Linux (Debian, Ubuntu, Mint)
我得到了这个错误:
MySQL Error Message: Plugin caching_sha2_password could not be loaded: /usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
我通过以下步骤解决了这个问题:
在mysql控制台输入:$ mysql -u root -p,如果你没有root用户的密码,那么: 使用mysql数据库:>使用mysql; mysql> Alter user 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; 退出……mysql >退出; 完成了!
以下是在Windows 10上安装MySQL 8.0后对我有效的解决方案。
假设MySQL用户名为root,密码为admin
打开命令提示符,输入以下命令:
cd C:\Program Files\MySQL\MySQL Server 8.0\bin Mysql_upgrade -uroot -padmin Mysql -uroot -padmin ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY “管理”
Windows 10:
打开命令提示符:
cd "C:\Program Files\MySQL\MySQL Server 8.0\bin"
C:\Program Files\MySQL\MySQL Server 8.0\bin> mysql -u root -p
Enter password: *********
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'newrootpassword';
Query OK, 0 rows affected (0.10 sec)
mysql> exit
或者,您可以更改my.ini配置如下:
[mysqld]
default_authentication_plugin=mysql_native_password
重新启动MySQL服务器并再次打开Workbench。
如果你像我一样在GitLab上得到这个错误: 只要从最新版本更改到5.7版本即可;)
# .gitlab-ci.yml
rspec:
services:
# - mysql:latest (I'm using latest version and it causes error)
- mysql:5.7 #(then I've changed to this specific version and fix!)
实际上MySql在安装时允许两种类型的身份验证。
密码加密 传统加密
在这里阅读
因此,通过检查遗留身份验证,问题得到了解决。