使用DataGrip默认连接OceanBase数据库是会发生如下错误:
[01S00][-1] (conn=3731501) The server time_zone ‘GMT+08:00’ cannot be parsed. The server time zone must defined in the jdbc url string with the ‘serverTimezone’ parameter (or server time zone must be defined explicitly with sessionVariables=time_zone=‘Canada/Atlantic’ for example). See java.util.TimeZone#getAvailableIDs() for available TimeZone, depending on your JRE implementation.
解决方法:
Advanced->VM options:
设置值为 -Duser.timezone=Asia/Shanghai 即可
测试连接:
连接成功
02-13
583
07-31
2057
07-29
302