As discussed previously (see Section 3.5.1, “Importing a Cluster Into MySQL Cluster Manager: Basic Procedure”), importing a standalone or “wild” cluster that was not created with MySQL Cluster Manager into the manager requires the completion of four major tasks. The example provided over the next few sections shows all the steps required to perform those tasks.
Sample cluster used in example. The “wild” cluster used in this example consists of four nodes—one management node, two data nodes, and one SQL node. Each of these nodes resides on one of three hosts, the IP address for each is shown in the following table:
|Node type (executable)||Host name|
|Management node (ndb_mgmd)||
|Data node (ndbd)||
|Data node (ndbd)||
|SQL node (mysqld)||
We assume that these hosts are on a dedicated network or subnet,
and that each of them is running only the MySQL NDB Cluster binaries and
applications providing required system and network services. We
assume on each host that the MySQL NDB Cluster software has been installed
from a release binary archive (see
Installing an NDB Cluster Binary Release on Linux). We also
assume that management node is using
as the cluster's global configuration file, which is shown
[ndbd default] NoOfReplicas= 2 [ndb_mgmd] HostName= 198.51.100.102 DataDir= /home/ari/bin/cluster/wild-cluster/50/data NodeId= 50 [ndbd] HostName= 198.51.100.103 DataDir= /home/ari/bin/cluster/wild-cluster/2/data NodeId=2 [ndbd] HostName= 198.51.100.104 DataDir= /home/ari/bin/cluster/wild-cluster/3/data NodeId=3 [mysqld] HostName= 198.51.100.102 NodeId= 51 [api] NodeId= 52
Notice that for the import into MySQL Cluster Manager to be successful, the following must be true for the cluster's configuration:
NodeIDmust be explicitly assigned for every node.
DataDirmust be specified for each management and data node, and the data directories for different nodes cannot overlap with each other.
A “free” API node not bounded to any host must be provisioned, through which the mcmd agent can communicate with the cluster.