文档首页
MySQL 8.4 参考手册
8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

MySQL 8.4 参考手册 / 25 MySQL NDB 集群 8.4 / 25.5 NDB 集群程序 / 25.5.16 ndb_perror — 获取 NDB 错误消息信息
中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 73%

25.5.16 ndb_perror — 获取 NDB 错误信息25.5.16 ndb_perror — Obtain NDB Error Message Information

ndb_perror 显示指定错误代码的 NDB 错误信息。这包括错误消息、错误类型,以及该错误是永久性的还是临时性的。此工具旨在作为 perror --ndb 的直接替代工具,后者已不再支持。ndb_perror shows information about an NDB error, given its error code. This includes the error message, the type of error, and whether the error is permanent or temporary. This is intended as a drop-in replacement for perror --ndb, which is no longer supported.

用法Usage

ndb_perror [options] error_code

ndb_perror 不需要访问正在运行的 NDB 集群或任何节点(包括 SQL 节点)。要查看特定 NDB 错误的信息,请使用错误代码作为参数调用该程序,如下所示:ndb_perror does not need to access a running NDB Cluster, or any nodes (including SQL nodes). To view information about a given NDB error, invoke the program, using the error code as an argument, like this:

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

如只显示错误信息,请使用 ndb_perror 的 --silent 选项(短格式 -s),如下所示:To display only the error message, invoke ndb_perror with the --silent option (short form -s), as shown here:

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

像 perror 一样,ndb_perror 接受多个错误代码:Like perror, ndb_perror accepts multiple error codes:

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

关于 ndb_perror 的其他程序选项将在本节后面说明。Additional program options for ndb_perror are described later in this section.

ndb_perror 取代了 perror 中不再受 NDB Cluster 支持的 --ndb 选项。为了在可能依赖 perror 获取 NDB 错误信息的脚本和其他应用程序中更容易替换,ndb_perror 支持其自身的 “dummy” --ndb 选项,这个选项不会执行任何操作。ndb_perror replaces perror --ndb, which is no longer supported by NDB Cluster. To make substitution easier in scripts and other applications that might depend on perror for obtaining NDB error information, ndb_perror supports its own “dummy” --ndb option, which does nothing.

下表包含了所有特定于 NDB Cluster 程序 ndb_perror 的选项。表格后面有额外的描述。The following table includes all options that are specific to the NDB Cluster program ndb_perror. Additional descriptions follow the table.

附加选项Additional Options

  • --defaults-extra-file

    命令行格式Command-Line Format --defaults-extra-file=path--defaults-extra-file=path
    类型Type 字符串String
    默认值Default Value [none][none]

    在读取全局文件之后读取给定文件。Read given file after global files are read.

  • --defaults-file

    命令行格式Command-Line Format --defaults-file=path
    类型Type 字符串String
    默认值Default Value [none][none]

    仅从指定文件读取默认选项。Read default options from given file only.

  • --defaults-group-suffix

    命令行格式Command-Line Format --defaults-group-suffix=string
    类型Type 字符串String
    默认值Default Value [none][none]

    也读取组合了 concat(group, suffix) 的组。Also read groups with concat(group, suffix).

  • --help, -?

    命令行格式Command-Line Format --help--help

    显示程序帮助文本并退出。Display program help text and exit.

  • --login-path

    命令行格式Command-Line Format --login-path=path
    类型Type 字符串String
    默认值Default Value [none][none]

    从登录文件读取给定路径。Read given path from login file.

  • --no-login-paths

    命令行格式Command-Line Format --no-login-paths

    跳过从登录路径文件读取选项。Skips reading options from the login path file.

  • --ndb

    命令行格式Command-Line Format --ndb

    为了与依赖旧版本perror的应用程序兼容,这些版本使用该程序的--ndb选项。当与ndb_perror一起使用时,该选项不会起任何作用,并且会被它忽略。For compatibility with applications depending on old versions of perror that use that program's --ndb option. The option when used with ndb_perror does nothing, and is ignored by it.

  • --no-defaults

    命令行格式Command-Line Format --no-defaults--no-defaults

    除了登录文件之外,不从任何配置文件读取默认选项。Do not read default options from any option file other than login file.

  • --print-defaults

    命令行格式Command-Line Format --print-defaults

    打印程序参数列表然后退出。Print program argument list and exit.

  • --silent, -s

    命令行格式Command-Line Format --silent

    仅显示错误消息。Show error message only.

  • --version, -V

    命令行格式Command-Line Format --version

    打印程序版本信息并退出。Print program version information and exit.

  • --verbose, -v

    命令行格式Command-Line Format --verbose--verbose

    详细输出;使用 --silent 禁用。Verbose output; disable with --silent.