Connection to MySQL – @localhost failed.
[08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.
p>
is because the connection string of MySQL needs to configure the ServerTimezone attribute, which can be used in UTC, Hongkong, Asiz/Shanghai, etc.
if you use UTC, there will be a time difference of 8 hours, so Hongkong or Asiz/Shanghai is recommended.
p>
for example:
jdbc:mysql://localhost:3306/?serverTimezone=Asia/Shanghai
jdbc:mysql://localhost:3306/MyDB?serverTimezone=Asia/Shanghai
Read More:
- How to Fix Exception in thread “main“ com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications
- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure (How to Fix)
- solve com.mysql.jdbc . exceptions.jdbc4 .MySQLSyntaxErrorException:
- Solve the problem of garbled code when Python connects to ADB
- How to Solve MacOS Big Sur MySQL workbench flashback problem
- Analysis of JDBC connection to MySQL
- Solve the problem that dbvisualizer cannot connect to mysql8
- java.lang.ClassNotFoundException : com.mysql.jdbc . driver project cannot connect to database, exception, lack of MySQL driver
- When executing hive – f script com.mysql.jdbc . exceptions.jdbc4 .CommunicationsException: Communications link failure
- Node connects to MySQL error “Er”_ NOT_ SUPPORTED_ AUTH_ Mode “solution
- Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communicat
- An error is reported when the jeecg boot project connects to the MySQL database running on docker
- Solve the problem that node. js USES MySQL to connect econnunion 127.0.0.0.1:3306
- How to solve problems like curl: (7) failed to connect to raw.githubusercontent.com Port 443: problem with connection used
- Solve the error of ora-12514 when Navicat connects to Oracle Database
- How to solve the problem of string to CString garbled code?
- Solution to MySQL Error 1130 problem
- How to solve the problem of error reporting in Flink
- Solve the problem of MySQL 1251 client does not support
- How to solve the problem of Cannot find module’npmlog’ when installing nodejs under Linux