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

猜你喜欢

转载自www.cnblogs.com/hoganhome/p/12380981.html