5.2. Installation of MySQL Cluster

Installing MySQL Cluster involves installation of software on all of the machines that are going to be part of the cluster. The software for the Management Nodes may be installed on the Platform- or Execution Container hosts. However, the software for the Data Nodes should be installed on separate machines. Below is a list over different terms that are specific for MySQL Cluster.

Term

Definition

Management Node

The management node maintains the Cluster Configuration and hands out the configuration to the data nodes, SQL nodes, and Application Nodes. This functionality is incorporated in [CZ].

Data Nodes

The Data Storage which is incorporated in the Data Repository.

MySQL Server

The interface to the data nodes for creating/modifying schema and querying data. This functionality is incorporated in [CZ].

ClusterControl Server

This server is included in the Management Node and provides the other computers in the cluster with their respective configurations. This functionality is incorporated in [CZ].

Local checkpoint

A local checkpoint is when a copy of the database is written to disk. Each data node backup its partitions. If you have two data nodes, each of the nodes will backup its own half of the database. However, if one of the data nodes crash, the other data node will backup the entire database.

There will always be at least one full local checkpoint of the database written to disk. When one has been completely written, the next will start overwriting the oldest checkpoint

redo log

A redo log containing all the changes to the database will always be written as well. The redo log contains all the operations that have been made from at least two check points back. The changes stored from the oldest checkpoint will not be deleted until all the changes for a third checkpoint have been saved.

Partition

The database is divided into partitions where each data node is in charge of one partition each. The data is stored in a partition based on a hash made of the data so that each partition will always contain an equal share of the data in the database. If you have two replicas, then each node will have one partition which it is in charge of, and one secondary partition which is fully replicated. If the data node which is in charge of the partition crashes, the second data node with the replication will take charge of that partition as well.

If you have two data nodes, then data node 1 will be in charge of partition 0 and have partition 1 as a replica, while data node 2 will be in charge of partition 1 and have partition 0 as a replica.

Installing MySQL Cluster

Access to MySQL Cluster from the Execution Zone requires a client library (API) to be installed for the workflow to be able to communicate with the cluster, and how this is configured is also described in 5.2.1. Configurations for the MySQL Cluster Nodes.

To make an installation of MySQL Cluster you first have to purchase a copy from Oracle, log in as root, place the tar file in the /usr/ directory and extract the contents of the tar file with:

$ tar xvf /usr/<the name of the tar file>

Note!

When extracting the contents of the tar file, a new directory will be created. This is the directory referred to as the software folder for basedir in 5.2.1. Configurations for the MySQL Cluster Nodes.

To make it easier when making upgrades, and other changes, we recommend that you create a symbolic link to this software folder named mysql.

Placing the tar file in the /usr/ is a recommendation, you may place it in any other suitable directory. However, in this case, make sure to adjust the path for all the commands that point out the /usr/ directory, described in this section.

The tar files has to be extracted on all host on which management nodes or data nodes are going to run.

Then the installation is done in five different steps:

  1. Configuration of the the MySQL Cluster Nodes, see 5.2.1. Configurations for the MySQL Cluster Nodes.

  2. Configuration of the MySQL Server, see 5.2.2. Configurations for the MySQL Server.

  3. Initial startup of the MySQL Cluster, see 5.2.3. Initial Startup of the MySQL Cluster.

  4. Creating the tables, see 5.2.4. Creating Tables.

  5. Configuring properties, see 5.2.5. Configuring Properties.

For information about how to dimension the database, see /wiki/spaces/MZD73/pages/5605944.