mysql连接异常:The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zo

标签: 异常 mysql jdbc
1780人阅读 评论(0) 收藏 举报
分类:

错误信息如下:
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。。。

错误原因:mysql识别时区出现错误,这是因为访问的url中没有指定时区为UTC
出错误的url:

jdbc.url=jdbc:mysql://localhost:3306/seckill?useUnicode=true&characterEncoding=utf8

在后面添加时区的参数数即可:

jdbc.url=jdbc:mysql://localhost:3306/seckill?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC
查看评论

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

java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more tha...
  • zhanglei082319
  • zhanglei082319
  • 2017-09-29 12:29:53
  • 1213

SQLException: The server time zone value '�й���׼ʱ��' is unrecognized

在使用spring boot操作数据库的时候,莫名其妙抛了一个错误:ERROR o.a.tomcat.jdbc.pool.ConnectionPool - Unable to create initi...
  • u014520745
  • u014520745
  • 2017-07-20 17:40:59
  • 3917

The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You mu

服务器的时区价值”�й���׼ʱ��的识别或代表多个时区。您必须配置服务器或JDBC驱动程序(通过serverTimezone配置属性)使用一个更具体的时区值如果你想利用时区支持。 在通过在...
  • qq_36324685
  • qq_36324685
  • 2017-05-19 18:46:20
  • 1629

The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone.

在通过在数据库连接URL后,加上?serverTimezone=UTC
  • u010867557
  • u010867557
  • 2017-03-07 15:12:26
  • 4352

SSM时jdbc报错 Cannot create PoolableConnectionFactory (The server time zone value '�й���׼ʱ��' is unreco

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdb...
  • howard789
  • howard789
  • 2017-08-13 23:47:05
  • 773

bug: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone.

在 mysql 中执行命令试下: set global time_zone=’+8:00’ 设置为东8区就不报错了。...
  • sunlggggg
  • sunlggggg
  • 2017-01-15 19:25:57
  • 4495

SQLException: The server time zone value ‘�й���׼ʱ��’ is unrecognized

SQLException: The server time zone value ‘�й���׼ʱ��’ is unrecognized
  • koreyoshi326
  • koreyoshi326
  • 2017-12-12 07:07:40
  • 173

The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You m

在Mybatis连接数据库配置文件的时候报时区异常The server time zone value '�й���׼ʱ��' is unrecognized or represents more t...
  • LinFord1995
  • LinFord1995
  • 2017-09-13 11:51:37
  • 1244

使用连接mysql的jdbc驱动最新版引发的问题

转载自http://www.th7.cn/Program/java/201607/907115.shtml 使用最新的连接驱动mysql mysql-connector-java 6.0.3运行...
  • chenyidong521
  • chenyidong521
  • 2016-12-26 22:40:05
  • 1616

jdbc连接数据库 The server time zone value '�й���׼ʱ��' is unrecognized or represents more... 错误

jdbc连接数据库 The server time zone value ‘�й���׼ʱ��’ is unrecognized or represents more… 错误...
  • qq_33850908
  • qq_33850908
  • 2017-07-19 21:24:27
  • 291
    个人资料
    持之以恒
    等级:
    访问量: 1万+
    积分: 331
    排名: 23万+
    文章存档
    最新评论