ndb_show_tables 显示集群中所有 NDB 数据库对象的列表。默认情况下,这不仅包括用户创建的表和 NDB 系统表,还包括 NDB 特定的索引、内部触发器以及 NDB Cluster 磁盘数据对象。ndb_show_tables displays a list of all
NDB database objects in the
cluster. By default, this includes not only both user-created
tables and NDB system tables, but
NDB-specific indexes, internal
triggers, and NDB Cluster Disk Data objects as well.
可以与 ndb_show_tables 一起使用的选项显示在下表中。表格后提供了额外说明。Options that can be used with ndb_show_tables are shown in the following table. Additional descriptions follow the table.
用法Usage
ndb_show_tables [-c connection_string]
命令行格式Command-Line Format --character-sets-dir=path--character-sets-dir=path包含字符集的目录。Directory containing character sets.
命令行格式Command-Line Format --connect-retries=#类型Type 整数Integer 默认值Default Value 12最小值Minimum Value 0最大值Maximum Value 12放弃之前重试连接的次数。Number of times to retry connection before giving up.
命令行格式Command-Line Format --connect-retry-delay=#类型Type 整数Integer 默认值Default Value 5最小值Minimum Value 0最大值Maximum Value 5尝试联系管理服务器之间等待的秒数。Number of seconds to wait between attempts to contact management server.
命令行格式Command-Line Format --connect-string=connection_string类型Type 字符串String 默认值Default Value [none][none]与
--ndb-connectstring相同。Same as--ndb-connectstring.命令行格式Command-Line Format --core-file错误时生成核心文件;用于调试。Write core file on error; used in debugging.
--database,-d指定所需表所在的数据库名称。如果提供此选项,则表名必须跟在数据库名称之后。Specifies the name of the database in which the desired table is found. If this option is given, the name of a table must follow the database name.
如果未指定此选项,并且在
TEST_DB数据库中未找到任何表,ndb_show_tables 将发出警告。If this option has not been specified, and no tables are found in theTEST_DBdatabase, ndb_show_tables issues a warning.命令行格式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.
命令行格式Command-Line Format --defaults-file=path类型Type 字符串String 默认值Default Value [none][none]仅从指定文件读取默认选项。Read default options from given file only.
命令行格式Command-Line Format --defaults-group-suffix=string类型Type 字符串String 默认值Default Value [none][none]也读取组合了 concat(group, suffix) 的组。Also read groups with concat(group, suffix).
命令行格式Command-Line Format --help--help显示帮助文本并退出。Display help text and exit.
命令行格式Command-Line Format --login-path=path类型Type 字符串String 默认值Default Value [none][none]从登录文件读取给定路径。Read given path from login file.
命令行格式Command-Line Format --no-login-paths跳过从登录路径文件读取选项。Skips reading options from the login path file.
--loops,-l指定实用程序应执行的次数。当未指定此选项时,默认为 1,但如果使用此选项,则必须提供一个整数参数。Specifies the number of times the utility should execute. This is 1 when this option is not specified, but if you do use the option, you must supply an integer argument for it.
命令行格式Command-Line Format --ndb-connectstring=connection_string类型Type 字符串String 默认值Default Value [none][none]设置用于连接到 ndb_mgmd 的连接字符串。语法:
[nodeid=。覆盖id;][host=]hostname[:port]NDB_CONNECTSTRING和my.cnf中的条目。Set connection string for connecting to ndb_mgmd. Syntax:[nodeid=. Overrides entries inid;][host=]hostname[:port]NDB_CONNECTSTRINGandmy.cnf.命令行格式Command-Line Format --ndb-mgm-tls=level类型Type 枚举Enumeration 默认值Default Value relaxedrelaxed有效值Valid Values relaxedrelaxedstrictstrict设置连接到管理服务器所需的 TLS 支持级别;可以是
relaxed或strict。relaxed(默认)表示尝试建立 TLS 连接,但不要求成功;strict表示连接必须使用 TLS。Sets the level of TLS support required to connect to the management server; one ofrelaxedorstrict.relaxed(the default) means that a TLS connection is attempted, but success is not required;strictmeans that TLS is required to connect.命令行格式Command-Line Format --ndb-mgmd-host=connection_string类型Type 字符串String 默认值Default Value [none][none]与
--ndb-connectstring相同。Same as--ndb-connectstring.命令行格式Command-Line Format --ndb-nodeid=#类型Type 整数Integer 默认值Default Value [none][none]设置此节点的节点 ID,覆盖任何由
--ndb-connectstring设置的 ID。Set node ID for this node, overriding any ID set by--ndb-connectstring.--ndb-optimized-node-selection命令行格式Command-Line Format --ndb-optimized-node-selection启用事务节点选择的优化。默认启用;使用
--skip-ndb-optimized-node-selection来禁用。Enable optimizations for selection of nodes for transactions. Enabled by default; use--skip-ndb-optimized-node-selectionto disable.命令行格式Command-Line Format --ndb-tls-search-path=list类型Type 路径名Path name 默认值(Unix)Default Value (Unix) $HOME/ndb-tls$HOME/ndb-tls默认值(Windows)Default Value (Windows) $HOMEDIR/ndb-tls指定用于搜索 CA 文件的目录列表。在 Unix 平台上,目录名称用冒号 (
:) 分隔;在 Windows 系统上,使用分号 (;) 作为分隔符。目录引用可以是相对路径或绝对路径;它可以包含一个或多个环境变量,每个变量以美元符号 ($) 开头,并在使用前进行展开。Specify a list of directories to search for a CA file. On Unix platforms, the directory names are separated by colons (:); on Windows systems, the semicolon character (;) is used as the separator. A directory reference may be relative or absolute; it may contain one or more environment variables, each denoted by a prefixed dollar sign ($), and expanded prior to use.搜索从最左边的命名目录开始,按从左到右的顺序进行,直到找到文件。空字符串表示空搜索路径,这会导致所有搜索失败。由单个点 (
.) 组成的字符串表示搜索路径仅限于当前工作目录。Searching begins with the leftmost named directory and proceeds from left to right until a file is found. An empty string denotes an empty search path, which causes all searches to fail. A string consisting of a single dot (.) indicates that the search path limited to the current working directory.如果未提供搜索路径,则使用编译时的默认值。此值取决于所使用的平台:在 Windows 上,它是
\ndb-tls;在其他平台(包括 Linux)上,它是$HOME/ndb-tls。可以通过使用-DWITH_NDB_TLS_SEARCH_PATH编译 NDB Cluster 来覆盖该值。If no search path is supplied, the compiled-in default value is used. This value depends on the platform used: On Windows, this is\ndb-tls; on other platforms (including Linux), it is$HOME/ndb-tls. This can be overridden by compiling NDB Cluster using-DWITH_NDB_TLS_SEARCH_PATH.命令行格式Command-Line Format --no-defaults--no-defaults除了登录文件之外,不从任何配置文件读取默认选项。Do not read default options from any option file other than login file.
--parsable,-p使用此选项会使输出格式适用于
LOAD DATA。Using this option causes the output to be in a format suitable for use withLOAD DATA.命令行格式Command-Line Format --print-defaults打印程序参数列表然后退出。Print program argument list and exit.
如果指定,将显示临时表。If specified, this causes temporary tables to be displayed.
--type,-t可以用于将输出限制为一种类型的对象,通过整数类型代码指定,如下所示:Can be used to restrict the output to one type of object, specified by an integer type code as shown here:
1:系统表1: System table2:用户创建的表2: User-created table3:唯一哈希索引3: Unique hash index
任何其他值将导致列出所有
NDB数据库对象(默认值)。Any other value causes allNDBdatabase objects to be listed (the default).--unqualified,-u如果指定,则显示未限定的对象名称。If specified, this causes unqualified object names to be displayed.
命令行格式Command-Line Format --usage显示帮助文本并退出;与
--help相同。Display help text and exit; same as--help.命令行格式Command-Line Format --version显示版本信息并退出。Display version information and exit.
只有用户创建的 NDB Cluster 表可以通过 MySQL 访问;系统表如 SYSTAB_0 对 mysqld 是不可见的。不过,你可以使用 NDB API 应用程序查看系统表的内容,例如 ndb_select_all(参见 第 25.5.25 节,“ndb_select_all — 从 NDB 表打印行”)。Only user-created NDB Cluster tables may be accessed from
MySQL; system tables such as SYSTAB_0 are
not visible to mysqld. However, you can
examine the contents of system tables using
NDB API applications such as
ndb_select_all (see
Section 25.5.25, “ndb_select_all — Print Rows from an NDB Table”).