问题描述:
IDEA连接本地mysql失败
Connection to lanyuekeji@localhost failed.
[08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.
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.
翻译一下错误“ The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone”是时区不对,故在URL后面加上?serverTimezone=GMT%2B8 解决问题