日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

datagrip mysql乱码_DataGrip 2019.1.2 x64 连接MySQL出错解决

發布時間:2025/3/21 数据库 46 豆豆
生活随笔 收集整理的這篇文章主要介紹了 datagrip mysql乱码_DataGrip 2019.1.2 x64 连接MySQL出错解决 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

出錯代碼如下:

java.lang.RuntimeException: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value '?D1ú±ê×?ê±??' 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.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)

at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:85)

at com.mysql.cj.util.TimeUtil.getCanonicalTimezone(TimeUtil.java:132)

at com.mysql.cj.protocol.a.NativePro... (show balloon)

MySQL - @localhost: java.lang.RuntimeException: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value '?D1 ... more

出錯界面如下:

解決方法

1、在url后面加:?serverTimezone=utc

UTC代表的是全球標準時間 ,但是我們使用的時間是北京時區也就是東八區,領先UTC八個小時。UTC + (+0800) = 本地(北京)時間

2、使用中國標準時間。也是就serverTimezone=Asia/Shanghai

3、中文亂碼的解決方案:characterEncoding=utf8

如上所示:url后面增加 >??serverTimezone=Asia/Shanghai&characterEncoding=utf8

4、如還報錯:請選擇Driver > MySQL For 5.1

配置成功界面如下:

總結

以上是生活随笔為你收集整理的datagrip mysql乱码_DataGrip 2019.1.2 x64 连接MySQL出错解决的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。