Java连接数据库The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time

Java连接数据库The server time zone value ‘Öйú±ê׼ʱ¼ä’ is unrecognized or represents more than one time
时区问题,解决方案:
在url后面加上时区:&serverTimezone=GMT%2B8
如:
spring:
#数据库配置
datasource:
url: jdbc:mysql://10.0.0.12:3306/cms?characterEncoding=utf8&useUnicode=true&useSSL=false&serverTimezone=GMT%2B8
username: root
password: 123456

你可能感兴趣的:(后端Java,数据库)