Starting the cluster is not very difficult after it has been configured. Each cluster node process must be started separately, and on the host where it resides. The management node should be started first, followed by the data nodes, and then finally by any SQL nodes:
On the management host, issue the following command from the system shell to start the management node process:
ndb_mgmd -f /var/lib/mysql-cluster/config.ini
The first time that it is started, ndb_mgmd
must be told where to find its configuration file, using the
--config-file option. (See
Section 18.4.4, “ndb_mgmd — The MySQL Cluster Management Server Daemon”, for
For additional options which can be used with ndb_mgmd, see Section 18.4.26, “Options Common to MySQL Cluster Programs — Options Common to MySQL Cluster Programs”.
On each of the data node hosts, run this command to start the ndbd process:
If you used RPM files to install MySQL on the cluster host where the SQL node is to reside, you can (and should) use the supplied startup script to start the MySQL server process on the SQL node.
If all has gone well, and the cluster has been set up correctly, the cluster should now be operational. You can test this by invoking the ndb_mgm management node client. The output should look like that shown here, although you might see some slight differences in the output depending upon the exact version of MySQL that you are using:
ndb_mgm-- NDB Cluster -- Management Client -- ndb_mgm>
SHOWConnected to Management Server at: localhost:1186 Cluster Configuration --------------------- [ndbd(NDB)] 2 node(s) id=2 @192.168.0.30 (Version: 5.5.44-ndb-7.2.21, Nodegroup: 0, *) id=3 @192.168.0.40 (Version: 5.5.44-ndb-7.2.21, Nodegroup: 0) [ndb_mgmd(MGM)] 1 node(s) id=1 @192.168.0.10 (Version: 5.5.44-ndb-7.2.21) [mysqld(API)] 1 node(s) id=4 @192.168.0.20 (Version: 5.5.44-ndb-7.2.21)
The SQL node is referenced here as
[mysqld(API)], which reflects the fact that the
mysqld process is acting as a MySQL Cluster API
The IP address shown for a given MySQL Cluster SQL or other API
node in the output of
is the address used by the SQL or API node to connect to the
cluster data nodes, and not to any management node.
You should now be ready to work with databases, tables, and data in MySQL Cluster. See Section 18.2.5, “MySQL Cluster Example with Tables and Data”, for a brief discussion.