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 的 JDBC 驱动从 6.0 版本以上就必须设置 serverTimezone 参数
博主本人使用的MySQL 8.0.15对应驱动jar包:mysql-connector-java:8.0.15【根本原因】 在MySQL 5.5.45+、5.6.26+和5.7.6+的要求中,如果没有设置显式选项,则默认情况下必须建立SSL连接。
【解决】设置useSSL=false显式禁用SSL,或者设置useSSL=true并为服务器证书验证提供信任存储。
//在db连接串后面加上:useSSL=false //示例: "jdbc:mysql://localhost:3306/dbname?useSSL=false"