管理服务器是读取集群配置文件并将此信息分发给所有请求它的集群节点的进程。它还维护集群活动日志。管理客户端可以连接到管理服务器并检查集群状态。The management server is the process that reads the cluster configuration file and distributes this information to all nodes in the cluster that request it. It also maintains a log of cluster activities. Management clients can connect to the management server and check the cluster's status.
所有可以与 ndb_mgmd 一起使用的选项显示在下表中。表格之后有附加说明。All options that can be used with ndb_mgmd are shown in the following table. Additional descriptions follow the table.
--bind-address=host--bind-address=host命令行格式Command-Line Format --bind-address=host类型Type 字符串String 默认值Default Value [none][none]使管理服务器绑定到特定的网络接口(主机名或 IP 地址)。此选项没有默认值。Causes the management server to bind to a specific network interface (host name or IP address). This option has no default value.
命令行格式Command-Line Format --character-sets-dir=path--character-sets-dir=path包含字符集的目录。Directory containing character sets.
命令行格式Command-Line Format --cluster-config-suffix=name类型Type 字符串String 默认值Default Value [none][none]在读取
my.cnf中的集群配置部分时覆盖默认的组后缀;用于测试。Override defaults group suffix when reading cluster configuration sections inmy.cnf; used in testing.命令行格式Command-Line Format --config-cache[=TRUE|FALSE]类型Type 布尔Boolean 默认值Default Value TRUE此选项的默认值为
1(或TRUE,或ON),可用于禁用管理服务器的配置缓存,以便每次启动时都从config.ini读取配置(参见 第 25.4.3 节,“NDB 集群配置文件”)。你可以通过以下任意选项启动 ndb_mgmd 进程来实现:This option, whose default value is1(orTRUE, orON), can be used to disable the management server's configuration cache, so that it reads its configuration fromconfig.inievery time it starts (see Section 25.4.3, “NDB Cluster Configuration Files”). You can do this by starting the ndb_mgmd process with any one of the following options:--config-cache=0--config-cache=FALSE--config-cache=OFF
Using one of the options just listed is effective only if the management server has no stored configuration at the time it is started. If the management server finds any configuration cache files, then the
--config-cacheoption or the--skip-config-cacheoption is ignored. Therefore, to disable configuration caching, the option should be used the 第一个 time that the management server is started. Otherwise—that is, if you wish to disable configuration caching for a management server that has already created a configuration cache—you must stop the management server, delete any existing configuration cache files manually, then restart the management server with--skip-config-cache(or with--config-cacheset equal to 0,OFF,或FALSE).Using one of the options just listed is effective only if the management server has no stored configuration at the time it is started. If the management server finds any configuration cache files, then the--config-cacheoption or the--skip-config-cacheoption is ignored. Therefore, to disable configuration caching, the option should be used the first time that the management server is started. Otherwise—that is, if you wish to disable configuration caching for a management server that has already created a configuration cache—you must stop the management server, delete any existing configuration cache files manually, then restart the management server with--skip-config-cache(or with--config-cacheset equal to 0,OFF, orFALSE).配置缓存文件通常会在安装目录下名为
mysql-cluster的目录中创建(除非使用--configdir选项覆盖了此位置)。每次管理服务器更新其配置数据时,都会写入一个新的缓存文件。文件按创建顺序依次命名,格式如下:Configuration cache files are normally created in a directory namedmysql-clusterunder the installation directory (unless this location has been overridden using the--configdiroption). Each time the management server updates its configuration data, it writes a new cache file. The files are named sequentially in order of creation using the following format:ndb_
node-id_config.bin.seq-numbernode-id是管理服务器的节点 ID;seq-number是序列号,从 1 开始。例如,如果管理服务器的节点 ID 为 5,那么前三个配置缓存文件在创建时将被命名为ndb_5_config.bin.1、ndb_5_config.bin.2和ndb_5_config.bin.3。node-idis the management server's node ID;seq-numberis a sequence number, beginning with 1. For example, if the management server's node ID is 5, then the first three configuration cache files would, when they are created, be namedndb_5_config.bin.1,ndb_5_config.bin.2, andndb_5_config.bin.3.如果您的目的是清除或重新加载配置缓存,而不实际禁用缓存,则应使用 ndb_mgmd 启动,并使用
--reload或--initial选项,而不是--skip-config-cache。If your intent is to purge or reload the configuration cache without actually disabling caching, you should start ndb_mgmd with one of the options--reloador--initialinstead of--skip-config-cache.要重新启用配置缓存,只需重新启动管理服务器,但不要使用之前用于禁用配置缓存的
--config-cache或--skip-config-cache选项。To re-enable the configuration cache, simply restart the management server, but without the--config-cacheor--skip-config-cacheoption that was used previously to disable the configuration cache.ndb_mgmd 在使用
--skip-config-cache时不会检查配置目录(--configdir)或尝试创建一个配置目录。(Bug #13428853)ndb_mgmd does not check for the configuration directory (--configdir) or attempts to create one when--skip-config-cacheis used. (Bug #13428853)--config-file=,filename-ffilename命令行格式Command-Line Format --config-file=file禁用者Disabled by skip-config-file类型Type 文件名File name 默认值Default Value [none][none]指示管理服务器应使用哪个文件作为其配置文件。默认情况下,管理服务器会在与ndb_mgmd 可执行文件相同的目录中查找名为
config.ini的文件;否则必须明确指定文件名和位置。Instructs the management server as to which file it should use for its configuration file. By default, the management server looks for a file namedconfig.iniin the same directory as the ndb_mgmd executable; otherwise the file name and location must be specified explicitly.此选项没有默认值,除非管理服务器被强制读取配置文件,否则会被忽略,强制读取可能是因为ndb_mgmd使用
--reload或--initial选项启动,或者因为管理服务器找不到任何配置缓存。如果指定了--config-file而没有使用--initial或--reload中的任意一个,ndb_mgmd将拒绝启动。This option has no default value, and is ignored unless the management server is forced to read the configuration file, either because ndb_mgmd was started with the--reloador--initialoption, or because the management server could not find any configuration cache. If--config-fileis specified without either of--initialor--reload, ndb_mgmd refuses to start.--config-file选项也会被读取,如果 ndb_mgmd 是使用--config-cache=OFF启动的。更多信息请参见 第 25.4.3 节,“NDB 集群配置文件”。The--config-fileoption is also read if ndb_mgmd was started with--config-cache=OFF. See Section 25.4.3, “NDB Cluster Configuration Files”, for more information.命令行格式Command-Line Format --configdir=directory--config-dir=directory类型Type 文件名File name 默认值Default Value $INSTALLDIR/mysql-cluster指定集群管理服务器的配置缓存目录。该路径必须是绝对路径。否则,管理服务器将拒绝启动。Specifies the cluster management server's configuration cache directory. This must be an absolute path. Otherwise, the management server refuses to start.
--config-dir是此选项的别名。--config-diris an alias for this option.命令行格式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.
--daemon,-d命令行格式Command-Line Format --daemon指示 ndb_mgmd 以守护进程方式启动。这是默认行为。Instructs ndb_mgmd to start as a daemon process. This is the default behavior.
在 Windows 平台上运行 ndb_mgmd 时,此选项无效。This option has no effect when running ndb_mgmd on Windows platforms.
命令行格式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 --initial配置数据在内部进行缓存,而不是在每次启动管理服务器时从集群全局配置文件中读取(参见 第 25.4.3 节,“NDB 集群配置文件”)。使用
--initial选项会覆盖此行为,强制管理服务器删除任何现有的缓存文件,然后重新从集群配置文件中读取配置数据并建立新的缓存。Configuration data is cached internally, rather than being read from the cluster global configuration file each time the management server is started (see Section 25.4.3, “NDB Cluster Configuration Files”). Using the--initialoption overrides this behavior, by forcing the management server to delete any existing cache files, and then to re-read the configuration data from the cluster configuration file and to build a new cache.这与
--reload选项有两点不同。首先,--reload会强制服务器检查配置文件与缓存的内容是否一致,并且仅在文件内容与缓存不同的情况下才重新加载数据。其次,--reload不会删除任何已有的缓存文件。This differs in two ways from the--reloadoption. First,--reloadforces the server to check the configuration file against the cache and reload its data only if the contents of the file are different from the cache. Second,--reloaddoes not delete any existing cache files.如果ndb_mgmd以
--initial参数启动,但找不到全局配置文件,管理服务器将无法启动。If ndb_mgmd is invoked with--initialbut cannot find a global configuration file, the management server cannot start.当管理服务器启动时,它会检查同一 NDB 集群中是否存在其他管理服务器,并尝试使用其他管理服务器的配置数据。当对具有多个管理节点的 NDB 集群执行滚动重启时,这种行为会产生影响。更多信息请参见 第 25.6.5 节,“对 NDB 集群执行滚动重启”。When a management server starts, it checks for another management server in the same NDB Cluster and tries to use the other management server's configuration data. This behavior has implications when performing a rolling restart of an NDB Cluster with multiple management nodes. See Section 25.6.5, “Performing a Rolling Restart of an NDB Cluster”, for more information.
当与
--config-file选项一起使用时,缓存仅在实际找到配置文件时才会被清除。When used together with the--config-fileoption, the cache is cleared only if the configuration file is actually found.命令行格式Command-Line Format --install[=name]特定平台Platform Specific 窗口Windows 类型Type 字符串String 默认值Default Value ndb_mgmd导致 ndb_mgmd 被安装为 Windows 服务。可选地,您可以为该服务指定一个名称;如果未设置,服务名称默认为
ndb_mgmd。虽然更建议在my.ini或my.cnf配置文件中指定其他 ndb_mgmd 程序选项,但也可以将它们与--install一起使用。不过,在这种情况下,必须先指定--install选项,然后才可以给出其他选项,才能成功安装 Windows 服务。Causes ndb_mgmd to be installed as a Windows service. Optionally, you can specify a name for the service; if not set, the service name defaults tondb_mgmd. Although it is preferable to specify other ndb_mgmd program options in amy.iniormy.cnfconfiguration file, it is possible to use them together with--install. However, in such cases, the--installoption must be specified first, before any other options are given, for the Windows service installation to succeed.通常不建议将此选项与
--initial选项一起使用,因为这会导致每次服务停止和启动时配置缓存被清除并重建。如果您打算使用任何其他ndb_mgmd选项,这些选项会影响管理服务器的启动,也应谨慎操作,并确保您完全理解并考虑可能产生的任何后果。It is generally not advisable to use this option together with the--initialoption, since this causes the configuration cache to be wiped and rebuilt every time the service is stopped and started. Care should also be taken if you intend to use any other ndb_mgmd options that affect the starting of the management server, and you should make absolutely certain you fully understand and allow for any possible consequences of doing so.--install选项在非 Windows 平台上无效。The--installoption has no effect on non-Windows platforms.命令行格式Command-Line Format --interactive以交互模式启动 ndb_mgmd;也就是说,一旦管理服务器运行,就会启动一个 ndb_mgm 客户端会话。此选项不会启动任何其他 NDB 集群节点。Starts ndb_mgmd in interactive mode; that is, an ndb_mgm client session is started as soon as the management server is running. This option does not start any other NDB Cluster nodes.
命令行格式Command-Line Format --log-name=name类型Type 字符串String 默认值Default Value MgmtSrvr为该节点在集群日志中使用提供一个名称。Provides a name to be used for this node in the cluster log.
命令行格式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.
命令行格式Command-Line Format --mycnf从
my.cnf文件读取配置数据。Read configuration data from themy.cnffile.命令行格式Command-Line Format --ndb-connectstring=connection_string类型Type 字符串String 默认值Default Value [none][none]设置连接字符串。语法:
[nodeid=。覆盖id;][host=]hostname[:port]NDB_CONNECTSTRING和my.cnf中的条目。如果指定了--config-file,则会忽略此设置;如果两个选项同时使用,则会发出警告。Set connection string. Syntax:[nodeid=. Overrides entries inid;][host=]hostname[:port]NDB_CONNECTSTRINGandmy.cnf. Ignored if--config-fileis specified; a warning is issued if both options are used concurrently.命令行格式Command-Line Format --ndb-log-timestamps类型Type 枚举Enumeration 默认值Default Value LEGACY有效值Valid Values LEGACYUTCUTCSYSTEMSYSTEM设置节点日志中使用的时间戳格式。这是以下值之一:Sets the format used for timestamps in node logs. This is one of the following values:
LEGACY在 MySQL 8.4 中是默认值,以保持与以前版本的向后兼容性。LEGACYis the default in MySQL 8.4, for backwards compatibility with previous versions.命令行格式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-nodeid-checks不进行任何节点 ID 检查。Do not perform any checks of node IDs.
命令行格式Command-Line Format --nodaemon指示 ndb_mgmd 不以守护进程方式启动。Instructs ndb_mgmd not to start as a daemon process.
在 Windows 上,ndb_mgmd 的默认行为是在前台运行,因此在 Windows 平台上使用此选项是没有必要的。The default behavior for ndb_mgmd on Windows is to run in the foreground, making this option unnecessary on Windows platforms.
命令行格式Command-Line Format --no-defaults--no-defaults除了登录文件之外,不从任何配置文件读取默认选项。Do not read default options from any option file other than login file.
命令行格式Command-Line Format --nowait-nodes=list类型Type 数字Numeric 默认值Default Value [none][none]最小值Minimum Value 1最大值Maximum Value 255在启动配置了两个管理节点的 NDB Cluster 时,每个管理服务器通常会检查另一个 ndb_mgmd 是否也在运行,以及另一个管理服务器的配置是否与自身相同。但是,有时希望仅使用一个管理节点启动集群(并且可能允许另一个 ndb_mgmd 稍后再启动)。此选项使管理节点跳过对传递给此选项的任何其他管理节点的检查,从而允许集群像仅使用已启动的管理节点配置一样启动。When starting an NDB Cluster is configured with two management nodes, each management server normally checks to see whether the other ndb_mgmd is also operational and whether the other management server's configuration is identical to its own. However, it is sometimes desirable to start the cluster with only one management node (and perhaps to allow the other ndb_mgmd to be started later). This option causes the management node to bypass any checks for any other management nodes whose node IDs are passed to this option, permitting the cluster to start as though configured to use only the management node that was started.
为了说明起见,考虑以下
config.ini文件的部分内容(我们已省略与此示例无关的大多数配置参数):For purposes of illustration, consider the following portion of aconfig.inifile (where we have omitted most of the configuration parameters that are not relevant to this example):[ndbd] NodeId = 1 HostName = 198.51.100.101 [ndbd] NodeId = 2 HostName = 198.51.100.102 [ndbd] NodeId = 3 HostName = 198.51.100.103 [ndbd] NodeId = 4 HostName = 198.51.100.104 [ndb_mgmd] NodeId = 10 HostName = 198.51.100.150 [ndb_mgmd] NodeId = 11 HostName = 198.51.100.151 [api] NodeId = 20 HostName = 198.51.100.200 [api] NodeId = 21 HostName = 198.51.100.201
假设您希望仅使用具有节点 ID 为
10的管理服务器启动该集群,并且运行在 IP 地址为 198.51.100.150 的主机上。(例如,假设您打算使用的另一台管理服务器所在的主机由于硬件故障暂时无法使用,您正在等待其维修完成。)要以这种方式启动集群,请在 198.51.100.150 机器上的命令行中输入以下命令:Assume that you wish to start this cluster using only the management server having node ID10and running on the host having the IP address 198.51.100.150. (Suppose, for example, that the host computer on which you intend to the other management server is temporarily unavailable due to a hardware failure, and you are waiting for it to be repaired.) To start the cluster in this way, use a command line on the machine at 198.51.100.150 to enter the following command:$>
ndb_mgmd --ndb-nodeid=10 --nowait-nodes=11如前例所示,在使用
--nowait-nodes时,你还必须使用--ndb-nodeid选项来指定此 ndb_mgmd 进程的节点 ID。As shown in the preceding example, when using--nowait-nodes, you must also use the--ndb-nodeidoption to specify the node ID of this ndb_mgmd process.然后,你可以以通常的方式启动集群的每个数据节点。如果你希望稍后在不重启数据节点的情况下启动并使用第二个管理服务器(除了第一个管理服务器之外),你必须使用引用两个管理服务器的连接字符串来启动每个数据节点,如下所示:You can then start each of the cluster's data nodes in the usual way. If you wish to start and use the second management server in addition to the first management server at a later time without restarting the data nodes, you must start each data node with a connection string that references both management servers, like this:
$>
ndbd -c 198.51.100.150,198.51.100.151对于希望作为连接到此集群的 NDB Cluster SQL 节点启动的任何 mysqld 进程使用的连接字符串也是同样适用的。有关更多信息,请参见 第 25.4.3.3 节,“NDB Cluster 连接字符串”。The same is true with regard to the connection string used with any mysqld processes that you wish to start as NDB Cluster SQL nodes connected to this cluster. See Section 25.4.3.3, “NDB Cluster Connection Strings”, for more information.
当与 ndb_mgmd 一起使用时,此选项仅影响管理节点相对于其他管理节点的行为。不要将其与用于 ndbd 或 ndbmtd 的
--nowait-nodes选项混淆,该选项允许集群在数据节点未全部就绪时启动;当与数据节点一起使用时,此选项仅影响它们相对于其他数据节点的行为。When used with ndb_mgmd, this option affects the behavior of the management node with regard to other management nodes only. Do not confuse it with the--nowait-nodesoption used with ndbd or ndbmtd to permit a cluster to start with fewer than its full complement of data nodes; when used with data nodes, this option affects their behavior only with regard to other data nodes.可以将多个管理节点 ID 作为逗号分隔的列表传递给此选项。每个节点 ID 必须不少于 1 且不大于 255。实际上,对于同一个 NDB 集群使用两个以上的管理服务器非常少见(或者有这种需求也很少);在大多数情况下,你只需要将一个管理服务器的节点 ID 传递给此选项,即你在启动集群时不希望使用的那个节点。Multiple management node IDs may be passed to this option as a comma-separated list. Each node ID must be no less than 1 and no greater than 255. In practice, it is quite rare to use more than two management servers for the same NDB Cluster (or to have any need for doing so); in most cases you need to pass to this option only the single node ID for the one management server that you do not wish to use when starting the cluster.
Note当你之后启动“missing”管理服务器,其配置必须与集群中已使用的管理服务器匹配。否则,它会在现有管理服务器执行的配置检查中失败,并且无法启动。When you later start the “missing” management server, its configuration must match that of the management server that is already in use by the cluster. Otherwise, it fails the configuration check performed by the existing management server, and does not start.
命令行格式Command-Line Format --print-defaults打印程序参数列表然后退出。Print program argument list and exit.
命令行格式Command-Line Format --print-full-config显示有关集群配置的扩展信息。在命令行中使用此选项时,ndb_mgmd 进程会打印集群设置的信息,包括集群配置部分的详细列表以及参数及其值。通常与
--config-file(-f) 选项一起使用。Shows extended information regarding the configuration of the cluster. With this option on the command line the ndb_mgmd process prints information about the cluster setup including an extensive list of the cluster configuration sections as well as parameters and their values. Normally used together with the--config-file(-f) option.命令行格式Command-Line Format --reloadNDB 集群配置数据是内部存储的,而不是每次管理服务器启动时从集群全局配置文件中读取(参见 第 25.4.3 节,“NDB 集群配置文件”)。使用此选项会强制管理服务器将其内部数据存储与集群配置文件进行检查,如果发现配置文件与缓存不匹配,则重新加载配置。现有的配置缓存文件会被保留,但不会被使用。NDB Cluster configuration data is stored internally rather than being read from the cluster global configuration file each time the management server is started (see Section 25.4.3, “NDB Cluster Configuration Files”). Using this option forces the management server to check its internal data store against the cluster configuration file and to reload the configuration if it finds that the configuration file does not match the cache. Existing configuration cache files are preserved, but not used.
这与
--initial选项有两方面的不同。首先,--initial会删除所有缓存文件。其次,--initial会强制管理服务器重新读取全局配置文件并创建新的缓存。This differs in two ways from the--initialoption. First,--initialcauses all cache files to be deleted. Second,--initialforces the management server to re-read the global configuration file and construct a new cache.如果管理服务器找不到全局配置文件,则
--reload选项将被忽略。If the management server cannot find a global configuration file, then the--reloadoption is ignored.当使用
--reload时,管理服务器在尝试读取全局配置文件之前,必须能够与数据节点以及集群中的其他管理服务器进行通信;否则,管理服务器将无法启动。这可能由于网络环境的变化引起,例如节点的新 IP 地址或防火墙配置的更改。在这种情况下,必须使用--initial来强制丢弃现有缓存的配置并从文件中重新加载。有关更多信息,请参阅 第 25.6.5 节,“执行 NDB 集群的滚动重启”。When--reloadis used, the management server must be able to communicate with data nodes and any other management servers in the cluster before it attempts to read the global configuration file; otherwise, the management server fails to start. This can happen due to changes in the networking environment, such as new IP addresses for nodes or an altered firewall configuration. In such cases, you must use--initialinstead to force the existing cached configuration to be discarded and reloaded from the file. See Section 25.6.5, “Performing a Rolling Restart of an NDB Cluster”, for additional information.命令行格式Command-Line Format --remove[=name]特定平台Platform Specific 窗口Windows 类型Type 字符串String 默认值Default Value ndb_mgmd移除已作为 Windows 服务安装的管理服务器进程,可选择指定要移除的服务名称。仅适用于 Windows 平台。Remove a management server process that has been installed as a Windows service, optionally specifying the name of the service to be removed. Applies only to Windows platforms.
命令行格式Command-Line Format --skip-config-file不读取集群配置文件;如指定,则忽略
--initial和--reload选项。Do not read cluster configuration file; ignore--initialand--reloadoptions if specified.命令行格式Command-Line Format --usage显示帮助文本并退出;同 --help。Display help text and exit; same as --help.
--verbose,-v命令行格式Command-Line Format --verbose--verbose移除已作为 Windows 服务安装的管理服务器进程,可选择指定要移除的服务名称。仅适用于 Windows 平台。Remove a management server process that has been installed as a Windows service, optionally specifying the name of the service to be removed. Applies only to Windows platforms.
命令行格式Command-Line Format --version显示版本信息并退出。Display version information and exit.
启动管理服务器时并不严格要求指定连接字符串。但是,如果使用多个管理服务器,则应提供连接字符串,并且集群中的每个节点应明确指定其节点 ID。It is not strictly necessary to specify a connection string when starting the management server. However, if you are using more than one management server, a connection string should be provided and each node in the cluster should specify its node ID explicitly.
有关使用连接字符串的信息,请参见第 25.4.3.3 节,“NDB 集群连接字符串”。第 25.5.4 节,“ndb_mgmd — NDB 集群管理服务器守护进程”,描述了ndb_mgmd的其他选项。See Section 25.4.3.3, “NDB Cluster Connection Strings”, for information about using connection strings. Section 25.5.4, “ndb_mgmd — The NDB Cluster Management Server Daemon”, describes other options for ndb_mgmd.
以下文件由ndb_mgmd在其启动目录中创建或使用,并根据config.ini配置文件的指定,放置在DataDir中。下列列表中,node_id是唯一的节点标识符。The following files are created or used by
ndb_mgmd in its starting directory, and are
placed in the DataDir as
specified in the config.ini configuration
file. In the list that follows,
node_id is the unique node
identifier.
config.ini是整个集群的配置文件。该文件由用户创建,由管理服务器读取。第 25.4 节,“NDB 集群的配置” 讨论了如何设置此文件。config.iniis the configuration file for the cluster as a whole. This file is created by the user and read by the management server. Section 25.4, “Configuration of NDB Cluster”, discusses how to set up this file.ndb_是集群事件日志文件。此类事件的示例包括检查点启动和完成、节点启动事件、节点故障以及内存使用级别。完整的集群事件及其描述可参见 第 25.6 节,“NDB 集群管理”。node_id_cluster.logndb_is the cluster events log file. Examples of such events include checkpoint startup and completion, node startup events, node failures, and levels of memory usage. A complete listing of cluster events with descriptions may be found in Section 25.6, “Management of NDB Cluster”.node_id_cluster.log默认情况下,当集群日志的大小达到一百万字节时,文件将被重命名为
ndb_,其中node_id_cluster.log.seq_idseq_id是集群日志文件的序列号。(例如:如果序列号为 1、2 和 3 的文件已存在,下一个日志文件将使用数字4命名。)您可以使用LogDestination配置参数更改集群日志的大小、文件数量及其他特性。By default, when the size of the cluster log reaches one million bytes, the file is renamed tondb_, wherenode_id_cluster.log.seq_idseq_idis the sequence number of the cluster log file. (For example: If files with the sequence numbers 1, 2, and 3 already exist, the next log file is named using the number4.) You can change the size and number of files, and other characteristics of the cluster log, using theLogDestinationconfiguration parameter.ndb_是在以守护进程方式运行管理服务器时用于node_id_out.logstdout和stderr的文件。ndb_is the file used fornode_id_out.logstdoutandstderrwhen running the management server as a daemon.ndb_是在以守护进程方式运行管理服务器时使用的进程 ID 文件。node_id.pidndb_is the process ID file used when running the management server as a daemon.node_id.pid