The server time zone value ‘‘ is unrecognized or represents more than one time zone.
作者:互联网
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.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:127)
这个错误是因为数据库的时区和系统的时区不一致导致的,在数据库连接的url里加上
&serverTimezone=UTC
比如,往后划
private String dbUrl="jdbc:mysql://localhost:3306/db_popr?characterEncoding=utf8&serverTimezone=UTC";
private String dbUserName="root";
private String dbPassword="123456";
private String jdbcName="com.mysql.cj.jdbc.Driver";
标签:represents,jdbc,String,zone,time,private,mysql 来源: https://blog.csdn.net/m0_53291740/article/details/121720597