[08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.

连接mysql数据库时发生的错误:

Connection to oto@localhost failed.
[08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.

或许是因为数据库版本的原因,最后加上如下语句即可。

?serverTimezone=UTC

注:jdbc.url=jdbc:mysql://localhost:3306/oto?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC

你可能感兴趣的:([08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.)