java.sql.SQLException: The server time zone value ‘???ú±ê×??±??’ is unrecognized or represents more than one time zone.
服务器时区值不可识别,应该在MySQL连接字符串后面加上属性:serverTimezone=UTC
MySQL 8.0不能用老版的com.mysql.jdbc.Driver驱动了,需要换成mysql-connector-java-8.0.11.jar包中的com.mysql.cj.jdbc.Driver新版驱动
连接串url:
jdbc:mysql://localhost:3306/mail_server?useSSL=false&serverTimezone=UTC
0条评论
我要评论