mysql连接异常:The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zo错误
错误原因:mysql识别时区出现错误,这是因为访问的url中没有指定时区为UTC
出错误的url:
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/springbootdemo?useUnicode=true&characterEncoding=utf8
在后面添加时区的参数数即可:
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/springbootdemo?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC