报错信息:
Could not get JDBC Connection; nested exception is java.sql.SQLException: 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驱动版本不兼容数据库
解决方法
.修改jdbc.properties文件
修改url即可。
jdbc.driver=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/AppStore?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true
Could not get JDBC Connection; nested exception is java.sql.SQLException:
最新推荐文章于 2023-07-12 14:58:01 发布
本文详细解析了在使用MySQL数据库时遇到的时区配置错误,即“serverTimezone”值无法识别的问题,并提供了具体的解决方案,包括修改JDBC驱动版本和调整数据库连接URL中的时区参数。
2860

被折叠的 条评论
为什么被折叠?



