原因是少一个参数,设置时区的。

解决idea中mysql连接失败Could not create connection to database server. Attempted reconnect 3 times. Giving up.

 

 解决方法:

加一个参数:

serverTimezone=UTC
jdbc:mysql://localhost:3306/SshProject?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC

  

 

相关文章:

  • 2022-12-23
  • 2021-04-29
  • 2021-06-05
  • 2021-10-03
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
猜你喜欢
  • 2021-09-25
  • 2021-05-31
  • 2021-06-26
  • 2021-09-06
  • 2021-06-07
  • 2022-12-23
相关资源
相似解决方案