使用了Mysql Connector/J 6.x以上的版本,然后就报了时区的错误
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.
解决办法:
方法一:
在项目代码-数据库连接URL后,加上 (注意大小写必须一致)?serverTimezone=UTC
方法二:
在mysql中设置时区,默认为SYSTEM,如下图所示:
设置为如下:
set global time_zone=‘+8:00‘;
The server time zone value '?й???????' is unrecognized or represents more than one time zone.
原文地址:https://www.cnblogs.com/ssyuhh/p/9907641.html
时间: 2024-12-09 14:38:59