springboot连接mysql时出现的错误

出现的错误com.mysql.cj.exceptions.InvalidConnectionAttributeException: 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 propert

通过这里可以看出来需要配置serverTimezone,所以就配置一下 

在application.yml数据源配置中url后面加上如下修改:

url: jdbc:mysql://127.0.0.1:3306/seckill?serverTimezone=UTC

posted @ 2019-07-31 14:06  olzoooo  阅读(702)  评论(0编辑  收藏  举报