首页 > 数据库技术 > 详细

java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼

时间:2019-04-27 16:16:12      阅读:118      评论:0      收藏:0      [点我收藏+]

SpringBoot 2.1.4启动时报错

java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognized or represents more than one time......

application.properties中数据库配置为:

spring.datasource.url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=123456
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
解决方案1
在mysql中执行命令: 
set global time_zone=‘+8:00‘ 
解决方案2
修改application.properties数据库配置,添加serverTimezone=UTC:
spring.datasource.url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC

 

java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼

原文:https://www.cnblogs.com/kwpsz/p/10779020.html

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