[操作疑難] [求教]用NetBeans 連結MySQL失敗,原因time zone問題點解決?

本帖最後由 年逹 於 2020-2-16 15:21 編輯

初學MySQL,但用NetBeans 連結MySQL失敗,原因係當login時有以下warning:(見圖)
The server time zone value (亂碼)is unrecognised or represents more than one time zone.You must configure...
求教,應該點做,十分謝謝回答!

附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

本帖最後由 artai 於 2020-2-16 21:56 編輯

https://www.cnblogs.com/EasonJim/p/6906713.html
JDBC Connection string 的問題...
不知是否NetBeans的Bugs...

國內有人教修改MySQL的 my.ini 配置文件:
https://blog.csdn.net/yuanlaijike/article/details/84105490

TOP

JDBC Connection string 的問題...
不知是否NetBeans的Bugs...

國內有人教修改MySQL的 my.ini 配置文件:
...
artai 發表於 2020-2-16 21:54

多謝你的幫忙,但對我依位初學者來講太深,可否教一教我如何簡單少少去做.
謝謝!

TOP

回覆 3# 年逹


    create a file called my.cnf under C:\

add below content

  1. [mysqld]
  2. --default-time-zone="+08:00"
複製代碼

TOP

回覆  年逹


    create a file called my.cnf under C:\

add below content
ylimny 發表於 2020-2-17 22:49

試左,唔得呀

TOP

can u find the connection string in ur code?  post it here.
something like
"jdbc:mysql://localhost/db?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Europe/Moscow"

TOP

can u find the connection string in ur code?  post it here.
something like
"jdbc:mysql://localhost/ ...
CVSDF 發表於 2020-2-18 13:39

謝謝你的回答.
但我在Netbeans找不到你所講的connection string in ur code.
請問重有無其他版友可以幫忙?

TOP

TOP

you have those screens?
CVSDF 發表於 2020-2-19 16:01

巳找到Database URL,修改成以下:
jdbc:mysql://localhost:3306/mynewdatabase?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC

但不成功,只有試過用5.X 的版本成功,但長遠冇可能用5.X版本,求版友想想辨法.

TOP

路過的,試試這裏的答案

TOP