5.4.7 The start cluster Command

start cluster [--initial|-i] [--skip-init=process_id_list] cluster_name

This command starts the cluster named cluster_name, as shown in this example:

mcm> start cluster mycluster;
+------------------------------+
| Command result               |
+------------------------------+
| Cluster started successfully |
+------------------------------+
1 row in set (45.37 sec)

In order for the command to succeed, the cluster named in the command must already exist; otherwise the command fails with the error Cluster cluster_name not defined, as shown here:

mcm> list sites;
+--------+------+-------+------------------------------+
| Site   | Port | Local | Hosts                        |
+--------+------+-------+------------------------------+
| mysite | 1862 | Local | tonfisk,flundra,grindval,haj |
+--------+------+-------+------------------------------+
1 row in set (1.72 sec)

mcm> list clusters mysite;
+-----------+-----------+
| Cluster   | Package   |
+-----------+-----------+
| mycluster | mypackage |
+-----------+-----------+
1 row in set (1.70 sec)

mcm> start cluster yourcluster;
ERROR 5001 (00MGR): Cluster yourcluster not defined

In addition, the cluster must not already be running, as shown here:

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

mcm> start cluster mycluster;
ERROR 5005 (00MGR): Cluster mycluster is running

A cluster created for import cannot be started until the import has been completed. See Section 5.4.1, “The create cluster Command”, and Section 4.5, “Importing MySQL NDB Clusters into MySQL Cluster Manager”, for more information.

--initial option

The --initial option (short form: -i) causes the following to happen:

  • All cluster data node are started as if start process --initial had been used on them, which means that all data nodes wipe their data and start with clean data node file systems. NDB tables that were previously stored in the cluster are lost.

  • All cluster SQL nodes are started as if start process --initial have been used on them, which means MySQL Cluster Manager rebuilds the mysqld data directory with the mysqld --initialize-insecure command . However, the node's data directory must be empty, or the reinitialization will not be attempted.

    To skip reinitialization for any SQL nodes, list their process IDs (separated by commas if there are more than one) using the --skip-init=process_id_list option, for example:

    mcm> start cluster --initial --skip-init=50,51 mycluster;

    The --skip-init option only accepts SQL node IDs as its argument; it cannot be used to skip the initialization of data nodes.

Under normal circumstances, you should use this option to start a cluster only when either you do not wish to preserve any of its data (and want to make a clean start), or you intend to restore the cluster from backup to a known good state (see Section 5.8.5, “The restore cluster Command”). You should also be aware that no special warnings are printed by the mcm client when --initial is used with start cluster; the command is immediately executed.

For information about creating cluster backups, see Section 5.8.2, “The backup cluster Command”. If you need to know which backups are available (if any), use list backups.