Solve idea in mysql connection failed Could not create connection to database server. Attempted reconnect 3 times. Giving up.

The reason is that a few parameters, set time zone.

 

 Solution:

Add a parameter:

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

  

 

Guess you like

Origin www.cnblogs.com/flyingDragon/p/11268920.html