This section discusses upgrading MySQL Cluster Manager from a previous release to the latest release (currently 9.4.0), as well as providing basic guidance on upgrading the bundled MySQL NDB Cluster software.
- Only upgrades from MySQL Cluster Manager 8.0 and later are supported. 
- You cannot upgrade from MySQL Cluster Manager 1.4.x or earlier to release 9.4 or later directly; upgrade to release 8.0.34 or later first and then upgrade to 9.4, using the method outlined below. 
The basic steps for upgrading a MySQL Cluster Manager installation are listed here:
- Install the new version of the MySQL Cluster Manager software in the desired location. 
- Create a configuration for the new installation such that it uses the previous installation's data. 
- Stop all running MySQL Cluster Manager agent processes on all hosts. 
- Start the new agent processes, ensuring that they use the new configuration just created. 
      A more detailed explanation is provided of each of these steps in
      the next few paragraphs. For illustrative purposes, we assume an
      upgrade from an existing installation of MySQL Cluster Manager
      8.0.44 to a new installation of MySQL Cluster Manager
      9.4.0. For a Linux or a Unix-like system, we assume that
      the installation directories are
      /opt/mcm-8.0.44 and
      /opt/mcm-9.4.0, respectively; on
      Windows, we assume the installation directories are
      C:\Program Files\MySQL\MySQL Cluster Manager
      8.0.44\ and C:\Program
      Files\MySQL\MySQL Cluster Manager 9.4.0\, respectively.
    
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 3.1, “Obtaining MySQL Cluster Manager”, and Section 3.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 in the parent
        directory of the MySQL Cluster Manager installation directory by default, but
        can be set using the data_folder option in
        the agent configuration file.
      
      It is simplest for MySQL Cluster Manager software upgrades if the agent repository
      and the agent configuration file are located outside of the agent
      installation directory. Suppose the old version of the agent is
      installed to
      /opt/mcm-8.0.44, 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,
      create first the new configuration file (in the format for MySQL Cluster Manager
      9.4), at a desired location. You can do this by making a
      copy of the sample configuration file to the described location.
    
cp /mcm-install-dir/doc/sample_mcmd.conf /etc/mcm/mcmd.confYou should then copy over the old configuration settings from the 8.0 configuration file to the new configuration file, paying special attention to any differences in the configuration file format and the agent options (see Chapter 2, What Is New in MySQL Cluster Manager 9.4 and Section 3.4, “MySQL Cluster Manager Configuration File” for details; for upgrade from the 8.1 series and later, you can just reuse the old configuration file, making adjustments only for options that have changed from version to version.)
      To use the old data repository, add the following line to the new
      copy of the mcmd.conf file:
    
data_folder=/var/opt/mcmAfter this, you can save and close the file. See also Section 3.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
        --config option so that it uses the
        correct configuration file, like this:
      
$> mcmd --config=/etc/mcm/mcmd.conf &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 9.4.0  |
+------------------------------+
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 | 9.4.0    |
| flundra   | Available | 9.4.0    |
| alpha     | Available | 9.4.0    |
| beta      | Available | 9.4.0    |
| gamma     | Available | 9.4.0    |
+-----------+-----------+----------+
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   |
+--------+----------+----------+---------+-----------+-----------+
| 145    | ndb_mgmd | tonfisk  | running |           | mypackage |
| 1      | ndbdt    | tonfisk  | running | 0         | mypackage |
| 2      | ndbdt    | flundra  | running | 0         | mypackage |
| 146    | mysqld   | tonfisk  | running |           | mypackage |
| 147    | mysqld   | flundra  | running |           | mypackage |
| 148    | ndbapi   | *tonfisk | added   |           |           |
| 149    | 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 |
| 1      | ndbd     | beta  | running | n/a       | mypackage |
| 2      | ndbd     | gamma | running | n/a       | mypackage |
+--------+----------+-------+---------+-----------+-----------+
3 rows in set (0.01 sec)
See Chapter 4, 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.