springboot连接mysql8.x: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents
使用SpringBoot2.0连接mysql8.x时出现如下错误:
java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one timezone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use amore specifc time zone value if you want to utilize time zone support.at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:127)at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:95)at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:87)at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:61)at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:71)at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:76)at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:862)at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:444)at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:230)at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:226)at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1558)at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1623)at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2468)
解决方法:
在mysql的my.ini文件中配置如下内容:default-time-zone='+08:00'
之后重启mysql服务,再进行连接,就会解决该问题
springboot连接mysql8.x: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents相关推荐
- jdbc连接MysQL数据库时报错:The server time zone value ‘ ‘ is unrecognized or represents more than
报错:The server time zone value ' ' is unrecognized or represents more than one time zone. You must co ...
- The server time zone value is unrecognized or represents more than one time zone. 这个问题的解决方法
我在用spring boot开发jpa的时候,发现了这个问题: The server time zone value '???ú±ê×??±??' is unrecognized or represe ...
- java.sql.SQLException: The server time zone value '???ú±ê×??±??' is unrecognized or represents 解决方法
转载自https://blog.csdn.net/weixin_37577564/article/details/80329775 在JDBC使用的时候有时候会出现java.sql.SQLExcept ...
- mysql报错The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zo
练习C3P0连接mysql时报错: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than ...
- The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone问题解决
今天在使用JDBC连接数据库时出了一点问题: Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver cla ...
- JDBC告警系列(一)The server time zone value 'ÖÐ' is unrecognized or represents more than one time zone....
一.现象 java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents ...
- The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone
场景 运行Mybatis的generator自动生成代码时提示: caused by :The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognize ...
- 解决Hibernate报错The server time zone value is unrecognized or represents more than one time zone
解决Hibernate报错The server time zone value is unrecognized or represents more than one time zone 笔者在使 ...
- MySQL小问题:The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents...
这是因为时区设置不对 问题背景: 在运行storm项目,进行页面显示的时候,报错: java.sql.SQLException: The server time zone value 'Öйú±ê× ...
最新文章
- 20155328 《信息安全系统设计基础》第六周 课堂提交补充
- 64位微型计算机系统是指内存,重庆2012年计算机非等级考试一级笔试试题
- 全国大学生智能汽车竞赛介绍-2020
- sqlserver 查询中文查询不到 查询英文可以查到_估值数据和财报数据查询方法
- 网络编程与分层协议设计:基于linux平台实现,网络编程与分层协议设计:基于Linux平台实现...
- HFUT 1357.梯田AGAIN(安徽省2016“京胜杯”程序设计大赛 D)
- go interface 转 string_跟我一起学习go语言,map「string」interface「」代码示例
- Unity3D之NGUI基础2:使用NGUI
- 【泰国留学】为什么“内卷”是必然,这就是原因
- 写出10以内的奇偶数php,幼儿园中班科学活动“认识奇数偶数”
- 无刷直流电机学习(3)
- 在echarts中使用百度地图,卫星地图
- 回顾2020迎接2021,云客致用户的一封信
- Git工具常用命令详解
- 【亲测可访问】外网如何访问局域网本地搭建的服务器
- 字节青训营第一课之go语言入门的笔记和总结
- Android购物车存储,Android app购物车功能实现
- 2022年10月15号之JavaScript验证码
- 通过清华大学镜像和pip进行安装
- Ubuntu aosp 编译过程中Jack server SSL error 错误解决方法