start process {[--initial|-i] nodespec | --added} cluster_name
nodespec:
{nodetype | process_id_list}
process_id_list:
process_id[, process_id[, ...]]
This command starts the MySQL NDB Cluster processes specified by
nodespec
in the cluster named
cluster_name
. The status of the
processes to be started, as shown by
show status
--process
, must be added
,
stopped
, or failed
(only
if the failed process has exited properly can it be restarted
with the command).
This example demonstrates how to start the process having the
process ID 1
belonging to the cluster
mycluster
:
mcm> start process 1 mycluster;
+------------------------------+
| Command result |
+------------------------------+
| Process started successfully |
+------------------------------+
1 row in set (13.93 sec)
You can obtain process IDs for all processes in a given cluster
using show status
--process
or list
processes
. These are the same as the node IDs for
these processes as shown in the output of other
mcm client commands such as
get
or in the output of
ndb_mgm -e "show" (see
ndb_mgm — The NDB Cluster Management Client).
Instead of a single node, you can also specify the type of nodes or a list of nodes to start :
mcm> start process mysqld mycluster;
+------------------------------+
| Command result |
+------------------------------+
| Process started successfully |
+------------------------------+
1 row in set (15.72 sec)
mcm> start process 146,147 mycluster;
+------------------------------+
| Command result |
+------------------------------+
| Process started successfully |
+------------------------------+
1 row in set (3.92 sec)
The following requirements must be fulfilled when you specify a list of nodes to start, or the command will fail:
All nodes in the list must be of the same process type.
The list should not include all managed nodes of the cluster.
After the command finishes running, there should be at least 1 running data node per node group, and more than half of all data nodes in the cluster should be running.
The general rules on process dependencies are satisfied (for example, a mysqld node depends on some data nodes running, a data node depends on some management nodes running, and so on).
StartPartitionedTimeout
> 0
is needed to allow a single data node out of a total of two to be started alone.
When the --initial
option (short form:
-i
)
is used, the following happens:
For a data node, MySQL Cluster Manager starts it with the
--initial
option, causing the data node to rebuild its file system.For an SQL node, MySQL Cluster Manager rebuilds the mysqld data directory with the mysqld
--initialize-insecure
command for MySQL 8.4, 8.0 and 5.7, and with the mysql_install_db command for MySQL 5.6. The node's data directory must be empty, or the reinitialization will not be attempted.
Invoking this command with the
--added
option
rather than with a nodespec
starts
all nodes that were added previously to the cluster using
add process
but not yet
started. For the added data and
mysqld
nodes, the use of the
--added
option also implies the use of the
--initial
option, meaning that mcmd will attempt to
initialize the added nodes (see description for the
--initial
option above). Also, when the
--added
option is
used, once all the added nodes are running, a
CREATE NODEGROUP
command is
issued to the management node for the creation of new
nodegroups.
You cannot use this command to start a mysqld
process in a stopped or unavailable cluster—trying to do
so will cause an error. This applies, for example, to the case
in which a cluster has been created for a cluster import, but
the import is not yet completed (see
Section 5.4.1, “The create cluster
Command”, and
Section 4.5, “Importing MySQL NDB Clusters into MySQL Cluster Manager”).