码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2019-11-20 12:36:54      阅读:46      评论:0      收藏:0      [点我收藏+]

标签:use   configure   native   技术   const   ring   eth   info   set   

在使用spring JDBC 连接数据库时出现的错误:

Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: 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.


 at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)

解决办法:在setUrl 数据库后面添加:

?serverTimezone=UTC

技术图片

 

 

 

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

标签:use   configure   native   技术   const   ring   eth   info   set   

原文地址:https://www.cnblogs.com/YrZf/p/11896510.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!