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