The server time zone value ‘?й???’ is unrecognized or represents more than one time zone. You must c

简介: 报错信息如下: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.

链接MySql数据库是报错

报错信息如下: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.


在写SpringBoot链接MyBitis时,运用了Durid的数据库连接池,在连接数据库的时候突然报错,搜了一下,具体的解决办法就是:

在jdbc连接的url后面加上serverTimezone=UTC或GMT即可,如果需要指定使用gmt+8时区,需要写成GMT%2B8,不然可能会报错误,解析为空。

例子如下:

spring.datasource.url=jdbc:mysql://localhost:3306/book?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC
相关文章
|
7月前
|
Java 数据库连接 数据库
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
43 0
|
7月前
|
测试技术
Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded 的解决办法
Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded 的解决办法
251 0
|
7月前
|
数据库连接
数据库连接的时区问题 The server time zone value is unrecognized
数据库连接的时区问题 The server time zone value is unrecognized
124 0
|
关系型数据库 MySQL Java
超详解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
799 0
|
数据库连接 数据库
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.
|
关系型数据库 MySQL Java
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.
94 0
The server time zone value '?й???????' is unrecognized or represents more than one time zone.
|
关系型数据库 MySQL Java
The server time zone value ‘锟叫癸拷锟斤拷\u05FC时锟斤拷‘ is unrecognized or represents more than one time zone
The server time zone value ‘锟叫癸拷锟斤拷\u05FC时锟斤拷‘ is unrecognized or represents more than one time zone
The server time zone value ‘锟叫癸拷锟斤拷\u05FC时锟斤拷‘ is unrecognized or represents more than one time zone
|
Java 关系型数据库 MySQL
mybatis学习(8):The server time zone value ‘???ú±ê×??±??‘ is unrecognized or represents more
mybatis学习(8):The server time zone value ‘???ú±ê×??±??‘ is unrecognized or represents more
176 0
mybatis学习(8):The server time zone value ‘???ú±ê×??±??‘ is unrecognized or represents more
|
安全 对象存储
set_time_limit() has been disabled for security reasons
set_time_limit() has been disabled for security reasons
170 0
set_time_limit() has been disabled for security reasons