您的位置:首页 > 编程语言 > Java开发

mysql-connector-java 6.02 错误

2016-06-09 00:00 387 查看
摘要: 6.02 驱动 com.mysql.cj.jdbc.Driver ,报出java.sql.SQLException: The server time zone value 'CST' 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 ...

最进使用mysql-connector-java 6.02 ,发现IDEA提示,com.mysql.jdbc.Driver 已过期。于是换成 driverClass=com.mysql.cj.jdbc.Driver

尝试了一下, 跑Junit没事。但是放到tomcat上报出

ava.sql.SQLException: The server time zone value 'CST' 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.
网上找timezone 的解决办法,无效。后来发现,换成5.1.39版本的驱动后,把Driver名换成

driverClass=com.mysql.jdbc.Driver 后问题解决,原因到底是什么没有找到。继续寻找。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息