文件首頁
MySQL 9.0 參考手冊
相關文件 下載本手冊
PDF (美式信紙) - 40.0Mb
PDF (A4) - 40.1Mb
手冊頁 (TGZ) - 258.2Kb
手冊頁 (Zip) - 365.3Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 9.0 參考手冊  /  ...  /  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

perror 相同,ndb_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 取代了 perror --ndb,NDB Cluster 不再支援該選項。為了讓依賴 perror 以取得 NDB 錯誤資訊的指令碼和其他應用程式更容易進行替代,ndb_perror 支援其自己的 虛擬 --ndb 選項,該選項不做任何事。

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

其他選項

  • --defaults-extra-file

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

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

  • --defaults-file

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

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

  • --defaults-group-suffix

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

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

  • --help-?

    命令列格式 --help

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

  • --login-path

    命令列格式 --login-path=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 停用。