java.sql.SQLException: The server time zone value ‘�й���ʱ��‘ is unrecognized or represent.........
springboot整合mybatis时运行异常:
java.sql.SQLException: 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 com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) ~[mysql-connector-java-8.0.21.jar:8.0.21]
大概的意识就是:无法检查表是否已经使用元数据显示,在创建表的时候,不能正常连接,在往下看,The server time zone value ,关于这个版本,在Mysql服务的新版中种最为常见,因为我使用的环境为最新的MySLQ社区版8.0.11,在新版的数据库使用的时区与本地时区有区别,标准时区使用的是Unix元年的时间为起始点到当前时间中间所做的动作。国际标准失去与本地相差 8 个小时。
解决办法:
在我们的数据库连接信息中将:
spring.datasource.url= jdbc:mysql://localhost:3306/yimu
改成:
spring.datasource.url=jdbc:mysql://localhost:3306/yimu?serverTimezone=UTC
再次查询成功:
java.sql.SQLException: The server time zone value ‘�й���ʱ��‘ is unrecognized or represent.........相关推荐
- java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ 解决方案
java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ 解决方案 参考文章: (1)java.sql.SQLException: ...
- java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized
在application.yml中 spring:datasource:username: rootpassword:url: jdbc:mysql://127.0.0.1:3306/testdriv ...
- 连接MySql出现异常解决:java.sql.SQLException: The server time zone value is unrecognized or represents。
QUESTION: java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represent ...
- java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more
** java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents mo ...
- java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä'
java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more ...
- JDBC编程可能遇到的错误:java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or ..
文章目录 1.错误提示: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver 2.提示:Loading class com.mysql.jd ...
- 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 ...
- java.sql.SQLException: The server time zone value‘xxxxxxxx‘ is unrecognized
报错笔记 原因 一.org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with ...
- java.sql.SQLException: The server time zone value �й���ʱ�� is unrecognized or represents ...
使用springboot 整合mybatis项目启动控制台报错: java.sql.SQLException: The server time zone value '�й���ʱ��' is un ...
最新文章
- 阿里二面:如何设计与实现短URL服务?
- 陪伴程序员的一条龙、一骑士 36 岁了!
- php跟web前端的区别,php与javascript的区别是什么?
- Windows性能查看器:系统的性能信息(I/O,IIS最大连接数,Sql) ,以及解决 asp.net IIS 一二百多用户并发...
- ios command
- Hibernate操作数据库步骤(包括语法)
- Blockathon记录——by 参赛者 张翔
- 统计项目代码行数的工具——SLOCCount
- 北京高级项目经理市场需求
- fastboot使用
- 使用 Entrust 扩展包在 Laravel 5 中实现 RBAC 权限管理与安装配置
- 喀纳斯与圣诞之夜(随想)
- 为什么go语言还没有火起来?go语言有哪些劣势?
- 浅谈下关于 速营社 的几个优点
- 文字阴影 - text-shadow
- 贾跃亭所持乐视网股权触及平仓线 部分面临被司法拍卖
- FFMPEG基本操作命令指南(一)
- 给tr标签设置外边距
- 2021年中国稀土永磁材料产量、需求量及发展趋势分析[图]
- 怎么把手机游戏隐藏在计算机里,怎么把游戏从桌面上隐藏,怎么把游戏从桌面上隐藏起来?...