文件首頁
MySQL 8.4 參考手冊
相關文件 下載本手冊
PDF (US Ltr) - 39.9Mb
PDF (A4) - 40.0Mb
手冊頁 (TGZ) - 258.5Kb
手冊頁 (Zip) - 365.5Kb
資訊 (Gzip) - 4.0Mb
資訊 (Zip) - 4.0Mb


MySQL 8.4 參考手冊  /  ...  /  ndb_perror — 取得 NDB 錯誤訊息資訊

25.5.16 ndb_perror — 取得 NDB 錯誤訊息資訊

ndb_perror 顯示 NDB 錯誤的相關資訊 (根據其錯誤代碼)。這包括錯誤訊息、錯誤類型,以及錯誤是永久性還是暫時性。此程式旨在作為 perror --ndb 的替代品,因為後者已不再支援。

用法

ndb_perror [options] error_code

ndb_perror 不需要存取執行中的 NDB Cluster 或任何節點 (包括 SQL 節點)。若要檢視特定 NDB 錯誤的相關資訊,請像這樣使用錯誤代碼作為引數來叫用程式

$> ndb_perror 323
NDB error code 323: Invalid nodegroup id, nodegroup already existing: Permanent error: Application error

若要僅顯示錯誤訊息,請使用 ndb_perror 程式及 --silent 選項 (簡短形式為 -s) 來叫用,如下所示

$> ndb_perror -s 323
Invalid nodegroup id, nodegroup already existing: Permanent error: Application error

如同 perrorndb_perror 接受多個錯誤代碼

$> ndb_perror 321 1001
NDB error code 321: Invalid nodegroup id: Permanent error: Application error
NDB error code 1001: Illegal connect string

ndb_perror 的其他程式選項將於本節稍後說明。

ndb_perror 取代 NDB Cluster 不再支援的 perror --ndb。為了方便在腳本和其他可能依賴 perror 以取得 NDB 錯誤資訊的應用程式中進行替換,ndb_perror 支援其自己的 虛擬 --ndb 選項,該選項不執行任何操作。

下表包含 NDB Cluster 程式 ndb_perror 特有的所有選項。其他說明在表格之後。

其他選項

  • --defaults-extra-file

    命令列格式 --defaults-extra-file=路徑
    類型 字串
    預設值 [無]

    在讀取全域檔案後讀取指定的檔案。

  • --defaults-file

    命令列格式 --defaults-file=路徑
    類型 字串
    預設值 [無]

    僅從指定的檔案讀取預設選項。

  • --defaults-group-suffix

    命令列格式 --defaults-group-suffix=字串
    類型 字串
    預設值 [無]

    同時讀取 concat(group, suffix) 的群組。

  • --help, -?

    命令列格式 --help

    顯示程式說明文字並結束。

  • --login-path

    命令列格式 --login-path=路徑
    類型 字串
    預設值 [無]

    從登入檔案讀取指定路徑。

  • --no-login-paths

    命令列格式 --no-login-paths

    略過從登入路徑檔案讀取選項。

  • --ndb

    命令列格式 --ndb

    為了與依賴舊版 perror 的應用程式相容,該程式使用其 --ndb 選項。搭配 ndb_perror 使用時,此選項不執行任何操作,並且會被忽略。

  • --no-defaults

    命令列格式 --no-defaults

    除了登入檔案之外,不從任何選項檔案讀取預設選項。

  • --print-defaults

    命令列格式 --print-defaults

    列印程式引數清單並結束。

  • --silent, -s

    命令列格式 --silent

    僅顯示錯誤訊息。

  • --version, -V

    命令列格式 --version

    列印程式版本資訊並結束。

  • --verbose, -v

    命令列格式 --verbose

    詳細輸出;使用 --silent 停用。