content_image/856742.jpg
-> SOURCE_PORT=3306, -> SOURCE_USER=’myreplica’, -> SOURCE_PASSWORD=’53cr37’; 

For a complete list of options that can be used with this statement, see Section 13.4.2.1, “CHANGE MASTER TO Statement” . 

To provide replication backup capability, you also need to add an --ndb-connectstring  option to the replica’s my.cnf  file prior to starting the replication process. See Section 23.6.9, “NDB Cluster Backups With NDB Cluster Replication” , for details. 

For additional options that can be set in my.cnf  for replicas, see Section 17.1.6, “Replication and Binary Logging Options and Variables” . 

4. If the source cluster is already in use, you can create a backup of the source and load this onto the replica to cut down on the amount of time required for the replica to synchronize itself with the source. If the replica is also running NDB Cluster, this can be accomplished using the backup and restore procedure described in Section 23.6.9, “NDB Cluster Backups With NDB Cluster Replication” . 

ndb-connectstring= management_host [: port ] 

In the event that you are not  using NDB Cluster on the replica, you can create a backup with this command on the source: 

shell S > mysqldump --master-data=1 

Then import the resulting data dump onto the replica by copying the dump file over to it. After this, you can use the mysql  client to import the data from the dumpfile into the replica database as shown here, where dump_file  is the name of the file that was generated using mysqldump  on the source, and db_name  is the name of the database to be replicated: 

shell R > mysql -u root -p db_name  < dump_file 

For a complete list of options to use with mysqldump , see Section 4.5.4, “mysqldump — A Database Backup Program” . 

<img src='content_image/856742.jpg'>

## Note 

If you copy the data to the replica in this fashion, make sure that you stop the replica from trying to connect to the source to begin replicating before all the data has been loaded. You can do this by starting the replica with the --skip- slave-start  option on the command line, by including skip-slave-start in the replica’s my.cnf  file, or beginning with MySQL 8.0.24, by setting the skip_slave_start  system variable. Once the data loading has completed, follow the additional steps outlined in the next two sections. 

5. Ensure that each MySQL server acting as a replication source is assigned a unique server ID, and has binary logging enabled, using the row-based format. (See Section 17.2.1, “Replication Formats” .) In addition, we recommend enabling the slave_allow_batching  system variable, and possibly increasing the values used with the --ndb-batch-size  and --ndb-blob-write-batch-bytes options as well. All of these options can be set either in the source server’s my.cnf  file, or on the command line when starting the source mysqld  process. See Section 23.6.6, “Starting NDB Cluster Replication (Single Replication Channel)” , for more information. 

## 23.6.6 Starting NDB Cluster Replication (Single Replication Channel) 

This section outlines the procedure for starting NDB Cluster replication using a single replication channel. 

