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

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

在连接字符串后面加上?serverTimezone=UTC
其中UTC是统一标准世界时间。

在这里插入图片描述
在这里插入图片描述
添加这个时区后
在这里插入图片描述
在这里插入图片描述

Cannot connect to a database (不能连接到数据库)

Step 1. Check your network settings

Step 2. Check your connection properties

Step 3. Check the driver version

Step 4. Check if the connection with SSH or SSL is required

posted on 2022-08-28 22:19  热爱技术的小郑  阅读(217)  评论(0)    收藏  举报