IDEA连接数据库时报错

时间:2024-03-15 10:47:45

报错如下:
The specified database user/password combination is rejected: com.mysql.cj.exceptions.InvalidConnectionAttributeException: 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.
IDEA连接数据库时报错这个问题是时区不对,,所以只需在URL后面加上?serverTimezone=GMT%2B8 解决问题。
IDEA连接数据库时报错