springboot整合持久层技术(mysql驱动问题)

java.sql.SQLException: 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.

默认使用的是 8.0.16 版本的连接器;(最新版)

mysql数据库版本5.7.20。mysql驱动后期使用的时候,需要添加 serverTimezone 时区,然后就可以了

另一种解决办法为:

降低mysql连接器的版本

添加mysql版本。

还需要设置 driver-class-name ,在url部分需要添加 useSSL=false。不适用SSL连接(高版本的需要设置).

原文地址:https://www.cnblogs.com/ice-image/p/10941653.html