开发工具:IDEA
环境:jdk1.8,mysql 8.0.17
问题:springboot项目连接mysql数据库,报异常: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.
解决方式:查看application.properties配置文件
原配置文件如下:
在url中添加配置
如下图:
并且一定要确认自己的username和password正确,才可以与数据库进行连接。
连接数据库报错java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents m
最新推荐文章于 2023-04-09 15:59:13 发布