项目启动时提示: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.

yml配置

spring:
profiles:
active: dev datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/mydb?useUnicode=true&characterEncoding=utf8
username: eric
password: 123456 jpa:
hibernate:
ddl-auto: create
show-sql: true
解决方案1
在mysql中执行命令: 
set global time_zone='+8:00' 
解决方案2
修改application.properties数据库配置,添加serverTimezone=UTC:
url:jdbc:mysql://localhost:3306/mydb?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC

spring boot启动异常: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的更多相关文章

  1. Spring boot启动时报 java.sql.SQLException: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long错误

    Spring boot启动时报 java.sql.SQLException: java.lang.ClassCastException: java.math.BigInteger cannot be ...

  2. MySql数据库时区异常,java.sql.SQLException: The server time zone value '?й???׼ʱ?' is unrecognized or represents more than one time zone.

    JDBC访问MySql异常 Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException ...

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

    使用spring boot整合MySQL时一直报 java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecog ...

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

    在使用阿里的druid 时,报了一个异常java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized ...

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

    mybatis链接mysql,启动服务报错: java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecogni ...

  6. JDBC连接数据库报错:java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. ......

    问题:Java程序使用JDBC连接MySQL数据库时,控制台报错如下: java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' ...

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

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

  8. 【异常】The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.

    异常错误:The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone ...

  9. 异常: 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 configurat

    异常: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. ...

随机推荐

  1. 第四章 QML语法

    4.1 语法基础 import QtQuick 2.6 import QtQuick.Window 2.2 Rectangle { width: 400 height: 400 color: &quo ...

  2. 【Java】commons-lang3中DateUtils类方法介绍

    添加commons-lang3的Maven依赖 <dependency> <groupId>org.apache.commons</groupId> <art ...

  3. No module named 'requests'---问题解决记录

    今天在用Pycharm执行脚本时,报错.如下: 问题排查: 1,检查是否安装了requests cmd输入命令:pip install requests 提示有新版本可以升级,那 我就升级了. 然后输 ...

  4. 20180805-Java DataInputStream类

    DataInputStream dis = DataInputStream(InputStream in); 下面的例子演示了DataInputStream和DataOutputStream的使用,该 ...

  5. 学习日记13、ajax同时提交from表单和多个参数

    if ($("form").valid()) { $.ajax({ url: "@Url.Action("EditCusAndCusCard")&qu ...

  6. p5414 [YNOI2019]排序

    分析 这是真正的云南oi/px 我们需要考虑保留一段不降子序列 剩余的自由往前往后移动 所以dp一下即可 代码 #include<bits/stdc++.h> using namespac ...

  7. p4111 [HEOI2015]小Z的房间[简述矩阵树定理]

    分析 [1]无向图 图G的度数矩阵为D,邻接矩阵为A 我们定义这个图的Kirchhoff矩阵为D-A 这个矩阵的任意一个n-1阶主子式的行列式的绝对值就是这个图的生成树个数 [2]有向图 如果要求内向 ...

  8. pycharm项目代码上传远程centos服务器

    pycharm项目代码上传远程centos服务器 在工作中,我们经常会遇到如下情况,在windows系统下的pycharm中开发项目,但是需要在linux服务器上部署和运行我们的项目.那么我们的项目是 ...

  9. day20—CSS中伪类:before与:after的应用:

    转行学开发,代码100天——2018-04-05 CSS中的两个伪类:before和:after适合应用与在元素的开始或者结尾处添加修饰性文字或外观,实现内容添加的同时并没有破坏HTML代码 语义.如 ...

  10. Oracle 11g修改默认端口1521为其他值

    1.修改listener.ora 打开文件D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora,修改PORT ...