Documentation Home
MySQL Cluster Manager 9.5 User Manual
Related Documentation Download this Manual
PDF (US Ltr) - 1.3Mb
PDF (A4) - 1.3Mb


MySQL Cluster Manager 9.5 User Manual  / ...  / Using MySQL Cluster Manager  / Importing MySQL NDB Clusters into MySQL Cluster Manager  /  Importing a Cluster Into MySQL Cluster Manager: Basic Procedure

4.5.1 Importing a Cluster Into MySQL Cluster Manager: Basic Procedure

The importing process consists generally of the steps listed here:

  1. Prepare thewild cluster for migration.

  2. Verify PID files for cluster processes.

  3. Create and configure in MySQL Cluster Manager atarget cluster whose configuration matches that of thewild cluster.

  4. Perform a test run, and then execute theimport cluster command.

This expanded listing breaks down each of the tasks just mentioned into smaller steps:

  1. Prepare thewild cluster for migration

    1. It is highly recommended that you take a complete backup of thewild cluster before you make changes to it, using thendb_mgm client. For more information, seeUsing The NDB Cluster Management Client to Create a Backup.

    2. Any cluster processes that are under the control of the system's boot-time process management facility, such as/etc/init.d on Linux systems or the Services Manager on Windows platforms, should be removed from its control.

    3. The wild cluster's configuration must meet the following requirements, and it should be reconfigured and restarted if it does not:

      • NodeID must be assigned for every node.

      • DataDir must be specified for each management and data node, and the data directories for different nodes cannot overlap with each other.

      • Afree API node not bounded to any host must be provisioned, through which themcmd agent can communicate with the cluster.

    4. Create a MySQL user namedmcmd on each SQL node, and grant root privileges to the user.

    5. Make sure that the configuration cache is disabled for each management node. Since the configuration cache is enabled by default, unless the management node has been started with the--config-cache=false option, you will need to stop and restart it with that option, in addition to other options that it has been started with previously.

  2. Verify cluster process PID files.

    1. Verify that each process in thewild cluster has a valid PID file.

    2. If a given process does not have a valid PID file, you must create one for it.

    SeeSection 4.5.2.2, “Verify All Cluster Process PID Files”, for a more detailed explanation and examples.

  3. Create and configuretarget cluster under MySQL Cluster Manager control

    1. Install MySQL Cluster Manager and startmcmd on all hosts with the same system user who started the wild cluster processes.

    2. Create a MySQL Cluster Manager site encompassing these hosts, using thecreate site command.

    3. Add a MySQL Cluster Manager package referencing the MySQL NDB Cluster binaries, using theadd package command. Use this command's--basedir option to point to the location of the MySQL NDB Cluster installation directory.

    4. Create the target cluster using thecreate cluster command, including the same processes and hosts used by the wild cluster. Use the command's--import option to specify that the cluster is a target for import.

      If the wild cluster adheres to the recommendation for node ID assignments given in the description for thecreate cluster command, you need not specify the node IDs for the processes in thecreate cluster command.

      Also, this step may be split into acreate cluster command followed by one or moreadd process commands (seeSection 4.5.2.3, “Creating and Configuring the Target Cluster”).

    5. For importing a cluster that uses TLS connections, perform the following steps (seeTLS Link Encryption for NDB Cluster andSection 4.11, “Using TLS Connections for NDB Clusters” for details):

    6. Useimport config to copy the wild cluster's configuration data into the target cluster. Use this command's--dryrun option (short form:-y) to perform a test run that merely logs the configuration information the command copies when it is executed without the option.

      If anyndb_mgmd ormysqld processes in the wild cluster are running on ports other than the default, you must first performset commands to assign the correct port numbers for them in the target cluster. When all such processes are running on the correct ports and the dry run is successful, you can executeimport config (without the--dryrun option) to copy the wild cluster's configuration data. Following this step, you should check the log as well as the configuration of the target cluster to ensure that all configuration attributes were copied correctly and with the correct scope. Correct any inconsistencies with the wild cluster's configuration using the appropriateset commands.

  4. Test and perform migration of wild cluster.

    1. Perform a test run of the proposed migration usingimport cluster with the--dryrun option, which causes MySQL Cluster Manager to check for errors, but not actually migrate any processes or data.

    2. Correct any errors found using--dryrun. Repeat the dry run from the previous step to ensure that no errors were missed.

    3. When the dry run no longer reports any errors, you can perform the migration usingimport cluster, but without the--dryrun option.