A replication channel requires two MySQL servers acting as replication servers (one each for the master and slave). For example, this means that in the case of a replication setup with two replication channels (to provide an extra channel for redundancy), there will be a total of four replication nodes, two per cluster.
Replication of an NDB Cluster as described in this section and
those following is dependent on row-based replication. This means
that the replication master MySQL server must be running with
--binlog-format=MIXED, as described
in Section 8.6, “Starting NDB Cluster Replication (Single Replication Channel)”. For
general information about row-based replication, see
If you attempt to use NDB Cluster Replication with
replication fails to work properly because the
ndb_binlog_index table on the master and the
epoch column of the
ndb_apply_status table on the slave are not
Section 8.4, “NDB Cluster Replication Schema and Tables”). Instead,
only updates on the MySQL server acting as the replication
master propagate to the slave, and no updates from any other SQL
nodes on the master cluster are replicated.
Beginning with NDB 7.2.13, the default value for the
--binlog-format option is
MIXED. (Bug #16417224)
In NDB 7.2.12 and earlier NDB Cluster 7.2 releases, the default
STATEMENT; this meant that you were required
to change the binary logging format to
MIXED) manually on all MySQL Servers on
the master NDB Cluster, prior to starting NDB Cluster
replication. If necessary, you can do this on startup using the
--binlog-format option, or at
runtime by setting the global
binlog_format system variable.
Using the startup option is preferred in such cases.
Each MySQL server used for replication in either cluster must be
uniquely identified among all the MySQL replication servers
participating in either cluster (you cannot have replication
servers on both the master and slave clusters sharing the same
ID). This can be done by starting each SQL node using the
id is a unique integer. Although
it is not strictly necessary, we will assume for purposes of this
discussion that all NDB Cluster binaries are of the same release
It is generally true in MySQL Replication that both MySQL servers (mysqld processes) involved must be compatible with one another with respect to both the version of the replication protocol used and the SQL feature sets which they support (see Replication Compatibility Between MySQL Versions). It is due to such differences between the binaries in the NDB Cluster and MySQL Server 5.5 distributions that NDB Cluster Replication has the additional requirement that both mysqld binaries come from an NDB Cluster distribution. The simplest and easiest way to assure that the mysqld servers are compatible is to use the same NDB Cluster distribution for all master and slave mysqld binaries.
We assume that the slave server or cluster is dedicated to replication of the master, and that no other data is being stored on it.
NDB tables being replicated must be created
using a MySQL server and client. Tables and other database objects
created using the NDB API (with, for example,
not visible to a MySQL server and so are not replicated. Updates
by NDB API applications to existing tables that were created using
a MySQL server can be replicated.
It is possible to replicate an NDB Cluster using statement-based replication. However, in this case, the following restrictions apply:
All updates to data rows on the cluster acting as the master must be directed to a single MySQL server.
It is not possible to replicate a cluster using multiple simultaneous MySQL replication processes.
Only changes made at the SQL level are replicated.
These are in addition to the other limitations of statement-based replication as opposed to row-based replication; see Advantages and Disadvantages of Statement-Based and Row-Based Replication, for more specific information concerning the differences between the two replication formats.