驱动jar包版本与数据库版本不匹配
如果还报错:
Caused by: 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.
at sun.reflect.GeneratedConstructorAccessor36.newInstance(Unknown Source)
那么,8.0版本的url请使用
jdbc:mysql://localhost:8888/gossip?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&useSSL=true