小伙伴们连接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.
可以尝试一下在原先的URL代码后面加上后面红框下面的代码:
//?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
出现这个问题的原因是MySQL版本高了以后会有个时区类似的,添加以后就能够成功连接到数据库了