【问题标题】:Why can't I connect to my MySQL database using MySQL Workbench?为什么我无法使用 MySQL Workbench 连接到我的 MySQL 数据库?
【发布时间】:2018-10-08 20:03:42
【问题描述】:

我无法使用 MySQL Workbench 连接到我的 MySQL 数据库。我正在使用 MySQL Community Server 8.0.11 和 MySQL Workbench 6.3 CE。我也在使用 Windows 10 家庭版。

当我在 MySQL Workbench 中单击默认 MySQL 连接时,它说它遇到了错误。没有提供更多信息。

我可以使用该命令毫无问题地连接到我的 MySQL 服务器 mysql -u root -p -h 127.0.0.1 -P 3306.

以下是我的服务器的状态。

mysql  Ver 8.0.11 for Win64 on x86_64 (MySQL Community Server - GPL)

Connection id:          12
Current database:
Current user:           root@localhost
SSL:                    Cipher in use is DHE-RSA-AES128-GCM-SHA256
Using delimiter:        ;
Server version:         8.0.11 MySQL Community Server - GPL
Protocol version:       10
Connection:             127.0.0.1 via TCP/IP
Server characterset:    utf8mb4
Db     characterset:    utf8mb4
Client characterset:    cp850
Conn.  characterset:    cp850
TCP port:               3306
Uptime:                 15 min 55 sec

Threads: 2  Questions: 6  Slow queries: 0  Opens: 110  Flush tables: 2  Open tables: 86  Queries per second avg: 0.006

【问题讨论】:

标签: mysql mysql-workbench


【解决方案1】:

我使用 -log-level=debug3 命令执行了 MySQL Workbench:MySQLWorkbench.exe -log-level=debug3。

阅读程序生成的日志后发现如下信息:

21:10:22 [ERR][SQL Editor Form]: SqlEditorForm: exception in do_connect method: Exception: Authentication plugin 'caching_sha2_password' cannot be loaded: Não foi possível encontrar o módulo especificado.

21:10:22 [ERR][  GRTDispatcher]: exception in grt execute_task, continuing: Exception: Authentication plugin 'caching_sha2_password' cannot be loaded: Não foi possível encontrar o módulo especificado.

21:10:22 [ERR][  GRTDispatcher]: worker: task 'execute sql queries' has failed with error:.Authentication plugin 'caching_sha2_password' cannot be loaded: Não foi possível encontrar o módulo especificado.

21:10:22 [ERR][SQL Editor Form]: SQL editor could not be connected: Authentication plugin 'caching_sha2_password' cannot be loaded: Não foi possível encontrar o módulo especificado.

21:10:22 [ERR][SQL Editor Form]: Your connection attempt failed for user 'root' from your host to server at 127.0.0.1:3306:
Authentication plugin 'caching_sha2_password' cannot be loaded: Não foi possível encontrar o módulo especificado.

这个问题Authentication plugin 'caching_sha2_password' cannot be loaded 帮助我解决了这个问题。现在我可以连接到我的 MySQL 服务器了。

【讨论】:

    【解决方案2】:

    看起来是 MySQL Workbench 在您的机器上没有正确启动。我从官方网站上找到this 尝试看看它是否有效,如果没有尝试将错误报告给开发团队并等待回复。或者,您可以尝试使用其他工具连接到您的数据库。

    【讨论】:

    • 谢谢。您传递给我的链接使我发现caching_sha2_password 是问题的原因。
    猜你喜欢
    • 1970-01-01
    • 2018-03-01
    • 2021-10-13
    • 1970-01-01
    • 1970-01-01
    • 2020-04-08
    • 1970-01-01
    • 1970-01-01
    • 2018-02-06
    相关资源
    最近更新 更多