[英]Why can't I connect to my MySQL database using MySQL Workbench?
I can't connect to my MySQL database using MySQL Workbench. 我无法使用MySQL Workbench连接到我的MySQL数据库。 I'm using MySQL Community Server 8.0.11 and MySQL Workbench 6.3 CE . 我正在使用MySQL社区服务器8.0.11和MySQL Workbench 6.3 CE 。 I'm also using Windows 10 Home. 我也在使用Windows 10 Home。
When I click in the default MySQL connection in MySQL Workbench it says it has encountered an error. 当我点击MySQL Workbench中的默认MySQL连接时,它说它遇到了错误。 No more information is provided. 没有提供更多信息。
I am able to connect to my MySQL Server without any problem using the command mysql -u root -p -h 127.0.0.1 -P 3306
. 我可以使用命令mysql -u root -p -h 127.0.0.1 -P 3306
连接到我的MySQL服务器而没有任何问题。
Following is the status of my server. 以下是我的服务器的状态。
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
It looks like it is MySQL Workbench that's not starting correctly on your machine. 看起来MySQL Workbench无法在您的计算机上正确启动。 I found this from the official website try and see if it works if not try reporting the bug to the dev team and wait for a response. 我在官方网站上发现了这一点 ,看看是否有效,如果没有尝试向开发团队报告错误并等待响应。 Alternatively you can try using a different tool to connect to your database. 或者,您可以尝试使用其他工具连接到数据库。
I executed MySQL Workbench using -log-level=debug3 command: MySQLWorkbench.exe -log-level=debug3
. 我使用-log-level = debug3命令执行MySQL Workbench: MySQLWorkbench.exe -log-level=debug3
。
After reading the log generated by the program I found following information: 在阅读程序生成的日志后,我发现了以下信息:
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.
This question Authentication plugin 'caching_sha2_password' cannot be loaded helped me resolving the problem. 此问题身份验证插件'caching_sha2_password'无法加载帮助我解决问题。 Now I can connect to my MySQL Server. 现在我可以连接到我的MySQL服务器了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.