MySQL解决时区问题:datadrip com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.

datadrip 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 property) to use a more specifc time zone value if you want to utilize time zone support.

错误如上:

解决方法:

在MySQL数据库钟执行命令行:

set global time_zone='+8:00';

在连接url后面加上:

eg:

 

 

?useSSL=false&serverTimezone=UTC0
posted @ 2020-02-28 23:07  老鲜肉  阅读(318)  评论(0)    收藏  举报