首页 > 其他 > 详细

The server time zone value '?й???????' is unrecognized or represents more than one time zone.

时间:2018-11-05 10:31:26      阅读:3623      评论:0      收藏:0      [点我收藏+]

使用了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

(0)
(2)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!