当尝试使用 DataGrip 连接到 MySQL 实例时,我收到一个 com.mysql.cj.exceptions.InvalidConnectionAttributeException
异常:
The server time zone value 'XXX' 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.
XXX
是我服务器的时区(我也喜欢异常 specifc 中的拼写错误)。这个错误阻止我创建到 MySQL 服务器的连接。是什么导致了这个问题?
最佳答案
您的服务器的时区不特定。要解决此问题,您需要将 serverTimezone
属性设置为特定的值。最简单的选择是在 Advanced 选项卡下将其设置为 UTC
:
明确地说,我不确定这会产生什么影响,但它确实让我建立了联系。
关于mysql - 尝试使用 DataGrip 连接到 MySQL 实例时如何修复导致异常的服务器时区?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55857889/