MySql:时区错误问题
JDBC连接数据库报错:
java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
解决:
mysql> show variables like '%time_zone%'; +------------------+--------+ | Variable_name | Value | +------------------+--------+ | system_time_zone | | | time_zone | SYSTEM | +------------------+--------+ 2 rows in set, 1 warning (0.00 sec) mysql> set global time_zone='+8:00'; Query OK, 0 rows affected (0.00 sec)
来自:https://blog.csdn.net/weixin_39033443/article/details/81711306