本文将为您描述解决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
解决idea中mysql连接失败Could not create connection to database server. Attempted reconnect 3 times. Giving up.就为您介绍到这里,感谢您关注懒咪学编程c.lanmit.com.
本文地址:https://c.lanmit.com/bianchengkaifa/Java/6859.html