NDB Cluster Replication: Bidrectional and Circular Replication SELECT  @LATEST_EPOCH :=MAX(epoch) FROM mysql.ndb_apply_status; SELECT Position,  @FIRST_FILE :=File FROM mysql.ndb_binlog_index WHERE epoch >  @LATEST_EPOCH  ORDER BY epoch ASC LIMIT 1; This type of circular replication setup is shown in the following diagram: Circular replication example.   In the next few paragraphs we consider the example of a replication setup involving three NDB Clusters numbered 1, 2, and 3, in which Cluster 1 acts as the replication source for Cluster 2, Cluster 2 acts as the source for Cluster 3, and Cluster 3 acts as the source for Cluster 1. Each cluster has two SQL nodes, with SQL nodes A and B belonging to Cluster 1, SQL nodes C and D belonging to Cluster 2, and SQL nodes E and F belonging to Cluster 3. It is possible to use NDB Cluster for bidirectional replication between two clusters, as well as for circular replication between any number of clusters. See also Section 7.5, “Point-in-Time (Incremental) Recovery” , for more information about the binary log, replication, and incremental recovery. 10. Find the latest binary log file ( @FIRST_FILE ) and position ( Position  column value) within this file that correspond to  @LATEST_EPOCH  in the  ndb_binlog_index  table: 11. Using  mysqlbinlog , replay the binary log events from the given file and position up to the point of the failure. (See Section 4.6.9, “mysqlbinlog — Utility for Processing Binary Log Files” .) •The SQL nodes on all sources and replicas are the same. •All SQL nodes acting as sources and replicas are started with the  log_slave_updates  system variable enabled. Circular replication using these clusters is supported as long as the following conditions are met: 23.6.10 NDB Cluster Replication: Bidrectional and Circular Replication 4637