我正在尝试使用来自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数据库DB。只有当我连接到MySQL时,我才会得到错误。
我该如何解决这个问题?
发布于 2020-07-09 03:19:58
我必须在Datagrip中选择MariaDB连接类型。然后我就可以连接到我的数据库了。我一定是安装了MariaDB而不是MySQL。
发布于 2020-10-22 20:40:49
您应该选择正确的驱动程序版本来连接到mysql。例如,如果您的MySQL服务器版本为5.x,且带有x <=1,则应使用版本5.1的mysql驱动程序。你的版本是5.1.73!简单地说,在DataGrip中,打开数据库连接的属性并单击"driver“链接。然后选择mysql driver v5.1。让它下载并安装,它应该可以工作。
https://stackoverflow.com/questions/62796372
复制相似问题