25.5.5 ndb_mgm — The NDB Cluster Management Client (original) (raw)

25.5.5 ndb_mgm — The NDB Cluster Management Client

The ndb_mgm management client process is actually not needed to run the cluster. Its value lies in providing a set of commands for checking the cluster's status, starting backups, and performing other administrative functions. The management client accesses the management server using a C API. Advanced users can also employ this API for programming dedicated management processes to perform tasks similar to those performed by ndb_mgm.

To start the management client, it is necessary to supply the host name and port number of the management server:

$> ndb_mgm [host_name [port_num]]

For example:

$> ndb_mgm ndb_mgmd.mysql.com 1186

The default host name and port number arelocalhost and 1186, respectively.

All options that can be used with ndb_mgm are shown in the following table. Additional descriptions follow the table.

Table 25.27 Command-line options used with the program ndb_mgm

Format Description Added, Deprecated, or Removed
--backup-password-from-stdin Get decryption password in a secure fashion from STDIN; use together with --execute and ndb_mgm START BACKUP command ADDED: NDB 8.0.24
--character-sets-dir=path Directory containing character sets REMOVED: 8.0.31
--connect-retries=# Set number of times to retry connection before giving up; 0 means 1 attempt only (and no retries) (Supported in all NDB releases based on MySQL 8.0)
--connect-retry-delay=# Number of seconds to wait between attempts to contact management server (Supported in all NDB releases based on MySQL 8.0)
--connect-string=connection_string, -c connection_string Same as --ndb-connectstring (Supported in all NDB releases based on MySQL 8.0)
--core-file Write core file on error; used in debugging REMOVED: 8.0.31
--defaults-extra-file=path Read given file after global files are read (Supported in all NDB releases based on MySQL 8.0)
--defaults-file=path Read default options from given file only (Supported in all NDB releases based on MySQL 8.0)
--defaults-group-suffix=string Also read groups with concat(group, suffix) (Supported in all NDB releases based on MySQL 8.0)
--encrypt-backup Cause START BACKUP to encrypt whenever making a backup, prompting for password if not supplied by user ADDED: NDB 8.0.24
--execute=command, -e command Execute command and exit (Supported in all NDB releases based on MySQL 8.0)
--help, -? Display help text and exit (Supported in all NDB releases based on MySQL 8.0)
--login-path=path Read given path from login file (Supported in all NDB releases based on MySQL 8.0)
--ndb-connectstring=connection_string, -c connection_string Set connect string for connecting to ndb_mgmd. Syntax: "[nodeid=id;][host=]hostname[:port]". Overrides entries in NDB_CONNECTSTRING and my.cnf (Supported in all NDB releases based on MySQL 8.0)
--ndb-mgmd-host=connection_string, -c connection_string Same as --ndb-connectstring (Supported in all NDB releases based on MySQL 8.0)
--ndb-nodeid=# Set node ID for this node, overriding any ID set by --ndb-connectstring (Supported in all NDB releases based on MySQL 8.0)
--ndb-optimized-node-selection Enable optimizations for selection of nodes for transactions. Enabled by default; use --skip-ndb-optimized-node-selection to disable REMOVED: 8.0.31
--no-defaults Do not read default options from any option file other than login file (Supported in all NDB releases based on MySQL 8.0)
--print-defaults Print program argument list and exit (Supported in all NDB releases based on MySQL 8.0)
--try-reconnect=#, -t # Set number of times to retry connection before giving up; synonym for --connect-retries (Supported in all NDB releases based on MySQL 8.0)
--usage, -? Display help text and exit; same as --help (Supported in all NDB releases based on MySQL 8.0)
--version, -V Display version information and exit (Supported in all NDB releases based on MySQL 8.0)
$> ndb_mgm -e "SHOW"  
$> ndb_mgm --execute="SHOW"  

This is analogous to how the--execute or-e option works with themysql command-line client. SeeSection 6.2.2.1, “Using Options on the Command Line”.
Note
If the management client command to be passed using this option contains any space characters, then the command_must_ be enclosed in quotation marks. Either single or double quotation marks may be used. If the management client command contains no space characters, the quotation marks are optional.

Additional information about using ndb_mgm can be found inSection 25.6.1, “Commands in the NDB Cluster Management Client”.