我正在尝试使用 mySQL 连接器 Java 8.0.17 创建与 mySQL 8.0 的连接,但以下错误阻止了它:
Java.sql.SQLException: The server time zone value 'GMT Summer Time' 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.
我见过类似的 UTC 时区错误,但没有遇到任何 GMT 时区错误。我可以在 URL 中输入什么?
最佳答案
您需要将 serverTimezone
属性添加到您的 jdbc URL,其中包含服务器时区的值。例如:
jdbc:mysql://localhost:3306/databasename?serverTimezone=GMT
关于mysql - 无法连接到 mySQL,因为无法识别服务器时区值 'GMT Summer Time',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57688493/