com.mysql.jdbc.Driver报错问题
***在使用com.mysql.jdbc.Driver时报错,要将com.mysql.jdbc.Driver改成com.mysql.cj.jdbc.Driver
serverTimezone设定的问题
***报错是这样的: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.
这时候就需要在jdbc:mysql://localhost:3306/testjdbc(testjdbc是你自己的数据库名称)后面加上 “?serverTimezone=UTC”(注:引号是不用加的)