mysql数据库时区问题 The server time zone value is unrecognized...

解决方案一

进入cmd–>登陆进mysql–>修改time_zone变量的值

set global time_zone ='+8:00';

在这里插入图片描述

解决方案二

拼接url
在写url(数据库地址)时在数据库名后拼接上?serverTimezone=UTC即可

url=jdbc:mysql://localhost:3306/exam?serverTimezone=UTC

Supongo que te gusta

Origin blog.csdn.net/a347635191/article/details/97639146
Recomendado
Clasificación