MySQL时区问题
SpringBoot 连接MySQL报错:
Wed Jan 16 17:58:27 CST 2019
There was an unexpected error (type=Internal Server Error, status=500).
Failed to obtain JDBC Connection; nested exception is 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.
这是时区设置有问题:
specifc time zone value
需要指定时区
从命令行打开MySQL
show variables like '%time_zone%';
set global time_zone = '+8:00';
异常解决——The server time zone value ‘Öйú±ê׼ʱ¼ä’ is unrecognized or represents more than one