我正在尝试使用 jetbrains 的 Datagrip IDE 连接到我的计算机上的本地 MySQL 数据库。
当我连接时,我收到此错误:
[08001] CLIENT_PLUGIN_AUTH is required
com.mysql.cj.exceptions.UnableToConnectException: CLIENT_PLUGIN_AUTH is required.
我可以毫无问题地在本地登录命令行:
mysql -u root -p -h localhost
Enter password: ***************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 5.1.73-community-log MySQL Community Server (GPL)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
我还可以使用 Datagrip 连接到我的 postgres 数据库。只有当我连接到 MySQL 时才会出现错误。
如何解决这个问题?
最佳答案
您应该选择正确版本的驱动程序来连接mysql。 例如,如果您的 MySQL 服务器版本为 5.x,且 x <=1,则您将使用 mysql 驱动程序版本 5.1。 你有 5.1.73! 只需在 DataGrip 中打开数据库连接的属性,然后单击“驱动程序”链接。然后选择mysql驱动v5.1。让它下载并安装,它应该可以工作。
关于mysql - Datagrip IDE 无法通过需要 CLIENT_PLUGIN_AUTH 连接到 MySQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62796372/