点击最右边的database 展开后 点击小加号 IDEA 添加数据库
IDEA 添加数据库
点击mysql 然后IDEA 添加数据库
user 是我们的数据库账号 password是我们的数据库密码
IDEA 添加数据库
3306/后紧跟我们需要的数据库名称
最后 Test Condition

注意:这个地方可能会出现一个错误:

The specified user/password combination is rejected:

[HY000][1862] Your password has expired.
To log in you must change it using a client that supports expired passwords.

原因是:

MySQL 5.7.16 introduces password-expiration capability, to enable database administrators to expire account passwords and require users to reset their password.

所以我们只需重新修改下密码即可,修改方式如下:

打开cmd,以root权限登录mysql:(这里我的账户是root,密码也是root)

mysql -u root -p
IDEA 添加数据库
之后修改密码

IDEA 添加数据库
然后返回IDEA 添加数据库
就成功了

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2021-12-16
  • 2022-12-23
  • 2021-12-10
  • 2021-12-10
猜你喜欢
  • 2021-08-01
  • 2021-09-24
  • 2021-10-11
  • 2022-12-23
  • 2021-12-10
  • 2021-06-03
  • 2021-07-11
相关资源
相似解决方案