the reason
For time zone issues, the MySQL driver defaults to UTC time zone.
solution
- Modify time zone
# set time zone mysql> set global time_zone = '+8:00';
Query OK, 0 rows affected (0.00 sec)
# Set the time zone to East 8 mysql> set time_zone = '+8:00';
Query OK, 0 rows affected (0.00 sec)
# Refresh permissions to make the settings take effect immediately mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> show variables like '%time_zone%';
+------------------+--------+
| Variable_name | Value |
+------------------+--------+
| system_time_zone | EST |
| time_zone | +08:00 |
+------------------+--------+
2 rows in set (0.00 sec)
- Add after the url:?serverTimezone=GMT%2B8
Read More:
- [Solved] ERROR 2002 (HY000): Can’t connect to local MySQL server through socket’/var/lib/mysql/mysql.sock’ (2)
- Remote connection to MySQL database error: is not allowed to connect to this MYSQL server solution
- MySql Install Error: Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘
- [Solved] MYSQL Command Execute Error: Can ‘t connect to local MySQL server through socket ‘/tmp/mysql.sock ‘(2) “
- host ‘‘ is not allowed to connect to this mysql server Connect MYSQL Error
- How to Fix MySQL ERROR 1130 (HY000): Host ‘XXXX’ is not allowed to connect to this MySQL server
- Ubuntu ERROR 2003 (HY000): Can’t connect to MySQL server on ‘127.0.0.1’ (111)
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’
- How to Solve can‘t connect to local mysql server through socket ‘/var/lib/mysql/mysql.sock‘
- MYSQL Enter password:ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost:3306‘
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’
- Mysql Flashback Warning: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe
- (Fixed) workbench MySQL Error Code: 2013. Lost connection to MySQL server during query
- IDEA maven Config MYSQL Connection Error: Could not create connection to database server.
- MySQL server has gone away Error [How to Solve]
- [Solved] Error: ER_HOST_NOT_PRIVILEGED: Host ‘x.x.x.x‘ is not allowed to connect to this MySQL server
- MYSQL 5.7 Error Code: 1290. The MySQL server is running with the –secure-file-priv option so it..
- [Solved] Navicat Connect MySQL error: Authentication plugin ‘caching_sha2_password‘ cannot be loaded
- MYSQL Insert Data Error: check the manual that corresponds to your MySQL server version for the right syntax
- MySQL Install Error: MySQL error 1042: Unable to connect to any of the specified MySQL hosts