0
点赞
收藏
分享

微信扫一扫

启动SpringBoot项目连接Mysql时区无法识别:java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecog

迎月兮 2022-09-14 阅读 188


一、错误信息

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.
 

 

二、解决办法

将连接mysql的url设置参数

启动SpringBoot项目连接Mysql时区无法识别:java.sql.SQLException: The server time zone value

粘贴下面:

url: jdbc:mysql://127.0.0.1:3306/{databaseName}?useSSL=false&useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC

 

举报

相关推荐

0 条评论