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.........相关推荐

  1. java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ 解决方案

    java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ 解决方案 参考文章: (1)java.sql.SQLException: ...

  2. 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 ...

  3. 连接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 ...

  4. 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 ...

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

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

  6. 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 ...

  7. 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 ...

  8. java.sql.SQLException: The server time zone value‘xxxxxxxx‘ is unrecognized

    报错笔记 原因 一.org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with ...

  9. java.sql.SQLException: The server time zone value �й���׼ʱ�� is unrecognized or represents ...

    使用springboot 整合mybatis项目启动控制台报错: java.sql.SQLException: The server time zone value '�й���׼ʱ��' is un ...

最新文章

  1. 阿里二面:如何设计与实现短URL服务?
  2. 陪伴程序员的一条龙、一骑士 36 岁了!
  3. php跟web前端的区别,php与javascript的区别是什么?
  4. Windows性能查看器:系统的性能信息(I/O,IIS最大连接数,Sql) ,以及解决 asp.net IIS 一二百多用户并发...
  5. ios command
  6. Hibernate操作数据库步骤(包括语法)
  7. Blockathon记录——by 参赛者 张翔
  8. 统计项目代码行数的工具——SLOCCount
  9. 北京高级项目经理市场需求
  10. fastboot使用
  11. 使用 Entrust 扩展包在 Laravel 5 中实现 RBAC 权限管理与安装配置
  12. 喀纳斯与圣诞之夜(随想)
  13. 为什么go语言还没有火起来?go语言有哪些劣势?
  14. 浅谈下关于 速营社 的几个优点
  15. 文字阴影 - text-shadow
  16. 贾跃亭所持乐视网股权触及平仓线 部分面临被司法拍卖
  17. FFMPEG基本操作命令指南(一)
  18. 给tr标签设置外边距
  19. 2021年中国稀土永磁材料产量、需求量及发展趋势分析[图]
  20. 怎么把手机游戏隐藏在计算机里,怎么把游戏从桌面上隐藏,怎么把游戏从桌面上隐藏起来?...

热门文章

  1. uoj 175. 新年的网警
  2. C# 接口中DateTime类型字段返回年月日格式,去掉时分秒的数据
  3. 网上的无形税:视频编解码器
  4. 机器学习系列2 机器学习的公平性
  5. 求助!这个问题(Python)如何解决?
  6. cpio.gz格式小系统
  7. 审视 Ajax,第 1 部分:透过华而不实的广告看本质zz
  8. Ubuntu 16.04运行SikulixIDE 2.0.5
  9. shodan基础用法
  10. AI:机器学习的正则化 (Regularization)