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

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

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

有什么解决办法吗?


当前回答

在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:不能打开共享对象文件:没有这样的文件或目录

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

其他回答

这是我在docker-compose中的数据库定义:

dataBase:
    image: mysql:8.0
    volumes:
        - db_data:/var/lib/mysql
    networks:
        z-net:
            ipv4_address: 172.26.0.2
    restart: always
    entrypoint: ['docker-entrypoint.sh', '--default-authentication-plugin=mysql_native_password']
    environment:
        MYSQL_ROOT_PASSWORD: supersecret
        MYSQL_DATABASE: zdb
        MYSQL_USER: zuser
        MYSQL_PASSWORD: zpass
    ports:
        - "3333:3306"

相关的行是入口点。

在构建和建立它之后,你可以用以下方法测试它:

$ mysql -u zuser -pzpass --host=172.26.0.2  zdb -e "select 1;"
Warning: Using a password on the command line interface can be insecure.
+---+
| 1 |
+---+
| 1 |
+---+

下面的解决方案对我很有效

进入Mysql Workbench -> Server-> Users and Privileges 1.单击“添加帐户”

2.在登录选项卡下提供新的详细信息,并确保选择认证类型作为标准,并选择各自的管理角色和模式特权

实际上MySql在安装时允许两种类型的身份验证。

密码加密 传统加密

在这里阅读

因此,通过检查遗留身份验证,问题得到了解决。

在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:不能打开共享对象文件:没有这样的文件或目录

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

刚刚下载了最新的mysqlworkbench,它与最新的加密兼容:

https://downloads.mysql.com/archives/workbench/

注意:在Mac big Sur上,最新的两个版本:8.0.22和8.0.23是错误的,不能工作。

使用8.0.21直到这些问题得到解决