我正在连接MySQL - 8.0与MySQL工作台和得到以下错误:

无法加载认证插件“caching_sha2_password”: dlopen (/ usr /地方/ mysql / lib /插件/ caching_sha2_password。所以,2):图像 没有找到

我也尝试过其他客户端工具。

有什么解决办法吗?


当前回答

如果你像我一样在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命令行客户端 使用新通行证创建一个新用户

考虑一个bin文件夹路径的例子,下面是你需要在命令提示符中逐行运行的代码:

cd C:\Program Files\MySQL\MySQL Server 5.7\bin
MySQL -u root -p    
current password...***  
CREATE USER 'nativeuser'@'localhost'  
IDENTIFIED WITH mysql_native_password BY 'new_password';

然后,您可以再次访问Workbench(在创建新的localhost连接并使用新的凭据开始使用程序之后,您应该能够这样做)。

用上面提到的用户名(本机用户)建立一个新的本地主机连接,使用密码(new_password)登录

由Career365团队回答的UDEMY常见问题

如果你像我一样在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!)

对于Windows 10,

修改C:\ProgramData\MySQL\MySQL Server 8.0目录下my.ini文件 (mysqld) default_authentication_plugin = mysql_native_password 重新启动MySQL服务。 通过命令行登录MySQL,在MySQL中执行如下命令: 创建新用户。 创建用户“USER”@“localhost” 授予所有特权。 授予'user'@'localhost'上的所有权限; 打开MySQL工作台,并使用新的用户凭证打开一个新连接。

我也面临着同样的问题,这个方法奏效了。

目前(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)。

在Debian 11中,我有mariadb-client-10.3 MySQL客户端,我有以下错误:

错误1045 (28000):Plugin caching_sha2_password cannot be loaded: /usr/lib/x86_64-linux-gnu/mariadb19/ Plugin /caching_sha2_password. txtso:不能打开共享对象文件:没有这样的文件或目录

我通过升级系统解决了这个问题。