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. 

配置参数如下

serverTimezone=Asia/Shanghai

jdbc:mysql://xxx:3306/database?serverTimezone=Asia/Shanghai&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull

最后修改于 2020-05-14 13:30:35
如果觉得我的文章对你有用,请随意赞赏
扫一扫支付
上一篇