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

如下图

解决办法:

在URL后面添加参数即可:

?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC

 

posted @ 2020-06-03 20:56  为乐而来  阅读(12488)  评论(0编辑  收藏  举报