Mysql错误:The server time zone value is unrecognized or represents more than one time zone

方法1、修改Mysql的时区为东8区,执行如下命令即可:

PS:这种方式每次开机都要配置的

set global time_zone='+8:00'

 方法2、配置改成这样的

spring.datasource.url=jdbc:mysql://localhost/fo_service?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT

 

posted @ 2021-12-14 21:15  云村的王子  阅读(91)  评论(0编辑  收藏  举报