4.4.5 The restart cluster Command

restart cluster cluster_name

This command performs a rolling restart (see Performing a Rolling Restart of a MySQL Cluster) of the cluster named cluster_name. The cluster must already be running in order for this command to succeed. (For information about how to determine the operation state of the cluster, see Section 4.4.6, “The show status Command”.)

For example, the command shown here performs a rolling restart of the cluster named mycluster:

 
mcm> restart cluster mycluster;
+--------------------------------+
| Command result                 |
+--------------------------------+
| Cluster restarted successfully |
+--------------------------------+
1 row in set (1 min 22.53 sec)

If the cluster is not already running, restart cluster fails with an error, as shown here:

mcm> show status --cluster mycluster;
+-----------+---------+---------+
| Cluster   | Status  | Comment |
+-----------+---------+---------+
| mycluster | stopped |         |
+-----------+---------+---------+
1 row in set (1.49 sec)

mcm> restart cluster mycluster;
ERROR 5009 (00MGR): Restart can not be performed as processes are 
stopped in cluster mycluster
Note

Depending on the number of nodes and the amount of data stored in the cluster, a rolling restart can take a considerable amount of time, up to several hours for a cluster with a great many data nodes and a large amount of data. For this reason, you may want to execute this command with the --background option (short form -B) to allow it to run in the background, freeing the MySQL Cluster Manager client for other tasks.

Currently, there is no mechanism in MySQL Cluster Manager for performing system initial restarts of a cluster. This means that attributes that require an initial restart to be changed must be set before the cluster is started for the first time.