2.5 Upgrading MySQL Cluster Manager

This section discusses upgrading MySQL Cluster Manager from a previous release to the latest release (currently 1.4.8), as well as providing basic guidance on upgrading the bundled MySQL NDB Cluster software.


Only upgrades from release 1.4.0 and later are supported.

The basic steps for upgrading a MySQL Cluster Manager installation are listed here:

  1. Install the new version of the MySQL Cluster Manager software in the desired location.

  2. Create a configuration for the new installation such that it uses the previous installation's data.

  3. Stop all running MySQL Cluster Manager agent processes on all hosts.

  4. Start the new agent processes, ensuring that they use the new configuration created previously.

A more detailed explanation is provided of each of these steps in the next few paragraphs. For purposes of example, we assume an upgrade from an existing installation of MySQL Cluster Manager 1.4.1 to a new installation of MySQL Cluster Manager 1.4.8. For a Linux or a Unix-like system, we assume that the installation directories are /opt/mcm-1.4.1 and /opt/mcm-1.4.8, respectively; on Windows, we assume the installation directories are C:\Program Files\MySQL\MySQL Cluster Manager 1.4.1\ and C:\Program Files\MySQL\MySQL Cluster Manager 1.4.8\.

Step 1: Install new MySQL Cluster Manager version.  You can obtain and install a new version of MySQL Cluster Manager in the same way as for a new installation (see Section 2.1, “Obtaining MySQL Cluster Manager”, and Section 2.3, “MySQL Cluster Manager Installation”), with the additional requirement that you should not attempt to install the new version in the same location as the version that you are currently using.

Step 2: Configure new installation.  In order for the new MySQL Cluster Manager agent binaries to manage the same MySQL NDB Cluster instances, they must be able to find the data contained in the agent repository used by the old installation's binaries, which is ../mcm_data (relative to the installation directory of MySQL Cluster Manager) by default, but can be set using the manager-directory directive in mcmd.ini.

It is simplest for MySQL Cluster Manager software upgrades if the agent repository and the agent configuration file are located externally to the agent installation directory. Suppose the old version of the agent is installed to /opt/mcm-1.4.1, and that it uses the directory /var/opt/mcm for its agent repository and /etc/mcm/mcmd.ini for its configuration file. In this case, to make the new binaries use the same configuration and repository, it is necessary only to start the new mcmd processes such that they use the same configuration file (see Step 4). Otherwise, you should copy the default configuration file to a location outside the installation directory, such as /etc/mcm/mcmd.ini, as shown here:

$> cp -r /opt/mcm-1.4.1/etc/mcmd.ini /etc/mcm/mcmd.ini

Then, add the following line to the new copy of the mcmd.ini file:


After this, you can save and close the file. See also Section 2.4, “MySQL Cluster Manager Configuration File”.

Step 3: Stop all agents.  Stop the agent processes using the old binaries on all hosts making up the management installation. You can stop all agents for a given site, for example mysite, using the stop agents command in the MySQL Cluster Manager client, as shown here:

mcm> stop agents mysite;

You should execute a stop agents command, similar to the one just shown, for each site listed in the output of list sites.

Step 4: Start new MySQL Cluster Manager binaries.  Start the new mcmd agent binaries with the --defaults-file option so that it uses the correct configuration file, like this:

$> mcmd --defaults-file=/etc/mcm/mcmd.ini &

A majority of the agents (i.e., at least half of the total number plus one) should be started within a period of 10 seconds; otherwise, the lack of a quorum of nodes for decision making might cause the communication among the nodes to break down.

You should now be able to start the mcm client from the new installation and perform management tasks as usual. Once the client successfully starts and connects to the agent, you can verify that it is running the correct version of the MySQL Cluster Manager software using the version command, as shown here:

mcm> version;
| Version                     |
| MySQL Cluster Manager 1.4.8 |
1 row in set (0.00 sec)

Next, check that all hosts, clusters, and processes on all sites are visible to the new mcm client, and are operational; for example:

mcm> list hosts mysite;
| Host      | Status    | Version |
| tonfisk   | Available | 1.4.8   |
| flundra   | Available | 1.4.8   |
| alpha     | Available | 1.4.8   |
| beta      | Available | 1.4.8   |
| gamma     | Available | 1.4.8   |

5 rows in set (0.16 sec)

mcmc> list clusters mysite;
| Cluster          | Package   |
| mycluster        | mypackage |
| yourcluster      | mypackage |
2 rows in set (2.07 sec)

mcm> show status --cluster mycluster;
| Cluster   | Status            | Comment |
| mycluster | fully operational |         |
1 row in set (0.01 sec)

mcm> show status --cluster yourcluster;
| Cluster     | Status            | Comment |
| yourcluster | fully operational |         |
1 row in set (0.01 sec)

mcm> show status -r mycluster;
| NodeId | Process  | Host     | Status  | Nodegroup | Package   |
| 49     | ndb_mgmd | tonfisk  | running |           | mypackage |
| 1      | ndbd     | tonfisk  | running | 0         | mypackage |
| 2      | ndbd     | flundra  | running | 0         | mypackage |
| 50     | mysqld   | tonfisk  | running |           | mypackage |
| 51     | mysqld   | flundra  | running |           | mypackage |
| 52     | ndbapi   | *tonfisk | added   |           |           |
| 53     | ndbapi   | *flundra | added   |           |           |
7 rows in set (0.08 sec)

mcm> show status -r yourcluster;
| NodeId | Process  | Host  | Status  | Nodegroup | Package   |
| 50     | ndb_mgmd | alpha | running |           | mypackage |
| 5      | ndbd     | beta  | running | n/a       | mypackage |
| 6      | ndbd     | gamma | running | n/a       | mypackage |
3 rows in set (0.01 sec)

See Chapter 3, Using MySQL Cluster Manager, for more information about performing common cluster management tasks with the mcm client.

Upgrading MySQL NDB Cluster.  Although the MySQL NDB Cluster software typically comes bundled with the MySQL Cluster Manager distribution, it is important to keep in mind that upgrading the MySQL Cluster Manager software does not upgrade any existing MySQL NDB Cluster installations. Since the new MySQL Cluster Manager installation uses the same configuration as the old one, the clusters under its control remain unchanged. If you wish to upgrade a cluster using the bundled MySQL NDB Cluster software, you should move the cluster directory (see Contents of the MySQL Cluster Manager Unix Distribution Archive) and all of its contents to a location outside the MySQL Cluster Manager installation directory. After this, you can use add package and upgrade cluster to upgrade one or more clusters to the new version of the MySQL NDB Cluster software.