In addition to the central configuration file, a cluster may also be controlled through a command-line interface available through the management client ndb_mgm. This is the primary administrative interface to a running cluster.
Commands for the event logs are given in Section 15.5.4, “Event Reports Generated in MySQL Cluster”; commands for creating backups and restoring from them are provided in Section 15.5.3, “Online Backup of MySQL Cluster”.
The management client has the following basic commands. In the
listing that follows, node_id
denotes
either a database node ID or the keyword ALL
,
which indicates that the command should be applied to all of the
cluster's data nodes.
HELP
Displays information on all available commands.
SHOW
Displays information on the cluster's status.
In a cluster where multiple management nodes are in use, this command displays information only for data nodes that are actually connected to the current management server.
node_id
START
Brings online the data node identified by
node_id
(or all data nodes).
To use this command to bring a data node online, the data node must have been started using ndbd --nostart or ndbd -n.
node_id
STOP
Stops the data node identified by
node_id
(or all data nodes). A data
node affected by this command disconnects from the cluster,
and its associated ndbd process terminates.
node_id
RESTART [-n] [-i]
[-a]
Restarts the data node identified by
node_id
(or all data nodes).
Using the -i
option with
RESTART
causes the data node to perform an
initial restart; that is, the node's file system is deleted
and recreated. The effect is the same as that obtained from
stopping the data node process and then starting it again
using ndbd --initial from the system shell.
Using the -n
option causes the data node
process to be restarted, but the data node is not actually
brought online until the appropriate START
command is issued. The effect of this option is the same as
that obtained from stopping the data node and then starting it
again using ndbd --nostart
or ndbd
-n
from the system shell.
Using the -a
causes all current transactions
relying on this node to be aborted. No GCP check is done when
the node rejoins the cluster.
node_id
STATUS
Displays status information for the data node identified by
node_id
(or for all data nodes).
ENTER SINGLE USER MODE
node_id
Enters single user mode, whereby only the MySQL server
identified by the node ID node_id
is allowed to access the database.
Do not attempt to have data nodes join the cluster while it is running in single user mode. Doing so can cause subsequent multiple node failures. (See Bug#20395 for more information.)
EXIT SINGLE USER MODE
Exits single user mode, allowing all SQL nodes (that is, all running mysqld processes) to access the database.
It is possible to use EXIT SINGLE USER
MODE
even when not in single user mode, although
the command has no effect in this case.
QUIT
, EXIT
Terminates the management client.
This command does not affect any nodes connected to the cluster.
SHUTDOWN
Shuts down all cluster data nodes and management nodes. To
exit the management client after this has been done, use
EXIT
or QUIT
.
This command does not shut down any SQL nodes or API nodes that are connected to the cluster.
User Comments
Add your own comment.