When you import a database error java.lang.RuntimeException IDEA: com.mysql.cj.exceptions.InvalidConnectionAttributeException:

Disclaimer: This blogger all podcasts are original works, subject to commercial use, copying, etc., must be held accountable for their legal proceedings. https://blog.csdn.net/wangzijian121/article/details/91050309

Specific error:

java.lang.RuntimeException: 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.

Solution:
After the database connection is added as follows.
Here Insert Picture Description

?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC

Guess you like

Origin blog.csdn.net/wangzijian121/article/details/91050309