In this section, we discuss the procedure for using MySQL Cluster Manager to create and start a new MySQL Cluster. We assume that you have already obtained the MySQL Cluster Manager and MySQL Cluster software, and that you are already familiar with installing MySQL Cluster Manager (see Chapter 2, MySQL Cluster Manager Installation, Configuration, Cluster Setup).
We also assume that you have identified the hosts on which you plan to run the cluster and have decided on the types and distributions of the different types of nodes among these hosts, as well as basic configuration requirements based on these factors and the hardware charactersitics of the host machines.
You can create and start a MySQL Cluster on a single host for
testing or similar purposes, simply by invoking
mcmd with the
option. See Section 3.2, “Starting and Stopping the MySQL Cluster Manager Agent”.
Creating a new cluster consists of the following tasks:
MySQL Cluster Manager agent installation and startup. Install the MySQL Cluster Manager software distribution, make any necessary edits of the agent configuration files, and start the agent processes as explained in Chapter 2, MySQL Cluster Manager Installation, Configuration, Cluster Setup. Agent processes must be running on all cluster hosts before you can create a cluster. This means that you need to place a complete copy of the MySQL Cluster Manager software distribution on every host. The MySQL Cluster Manager software does not have to be in a specific location, or even the same location on all hosts, but it must be present; you cannot manage any cluster processes hosted on a computer where mcmd is not also running.
MySQL Cluster Manager client session startup. Starting the MySQL Cluster Manager client and connect to the MySQL Cluster Manager agent. You can connect to an agent process running on any of the cluster hosts, using the mcm client on any computer that can establish a network connection to the desired host. See Section 3.3, “Starting the MySQL Cluster Manager Client”, for details.
MySQL Cluster software deployment.
The simplest and easiest way to do this is to copy the
complete MySQL Cluster distribution to the same location
on every host in the cluster. (If you have installed MySQL Cluster Manager
1.2.4 on each host, the MySQL Cluster NDB 7.2.4
distribution is already included, in
If you do not use the same location on every host, be sure
to note it for each host. Do not yet start any MySQL
Cluster processes or edit any configuration files; when
creating a new cluster, MySQL Cluster Manager takes care of these tasks
On Windows hosts, you should not install as services any of the MySQL Cluster node process programs, including ndb_mgmd.exe, ndbd.exe, ndbmtd.exe, and mysqld.exe. MySQL Cluster Manager manages MySQL Cluster processes independently of the Windows Service Manager and does not interact with the Service Manager or any Windows services when doing so.
You can actually perform this step at any time up to the
point where the software package is registered (using
add package). However,
we recommend that you have all required
software—including the MySQL Cluster
software—in place before executing any MySQL Cluster Manager client
Management site definition.
command in the MySQL Cluster Manager client, define a MySQL Cluster Manager management
site—that is, the set of hosts to be managed. This
command provides a name for the site, and must reference
all hosts in the cluster.
Section 4.2.3, “The
create site Command”, provides syntax and
other information about this command. To verify that the
site was created correctly, use the MySQL Cluster Manager client commands
list sites and
MySQL Cluster software package registration.
In this step, you provide the location of the MySQL
Cluster software on all hosts in the cluster using one or
commands. To verify that the package was created
correctly, use the
command to define the set of MySQL Cluster nodes
(processes) and hosts on which each cluster process runs,
making up a the MySQL Cluster. This command also uses the
name of the package registered in the previous step so
that MySQL Cluster Manager knows the location of the binary running each
cluster process. You can use the
list clusters and
list processes commands
to determine whether the cluster has been defined as
If you wish to use SQL node connection pooling, see Setup for mysqld connection pooling before creating the cluster.
Perform any configuration of the cluster that is required
or desired prior to starting it. You can set values for
MySQL Cluster Manager configuration attributes (MySQL Cluster parameters
and MySQL Server options) using the MySQL Cluster Manager client
set command. You do not
need to edit any configuration files directly—in
fact, you should not do so. Keep in
mind that certain attributes are read-only, and that some
others cannot be reset after the cluster has been started
for the first time. You can use the
get command to verify
that attributes have been set to the correct values.
Once you have completed the previous steps, including
necessary or desired initial configuration, you are ready
to start the cluster. The
cluster command starts all cluster processes in
the correct order. You can verify that the cluster has
started and is running normally after this command has
completed, using the MySQL Cluster Manager client command
show status. At this
point, the cluster is ready for use by MySQL Cluster