Rechercher dans le manuel MySQL
22.6.7 Using Two Replication Channels for NDB Cluster Replication
In a more complete example scenario, we envision two replication channels to provide redundancy and thereby guard against possible failure of a single replication channel. This requires a total of four replication servers, two masters for the master cluster and two slave servers for the slave cluster. For purposes of the discussion that follows, we assume that unique identifiers are assigned as shown here:
Table 22.425 NDB Cluster replication servers described in the text
Server ID | Description |
---|---|
1 | Master - primary replication channel (M) |
2 | Master - secondary replication channel (M') |
3 | Slave - primary replication channel (S) |
4 | Slave - secondary replication channel (S') |
Setting up replication with two channels is not radically
different from setting up a single replication channel. First, the
mysqld processes for the primary and secondary
replication masters must be started, followed by those for the
primary and secondary slaves. Then the replication processes may
be initiated by issuing the START
SLAVE
statement on each of the slaves. The commands and
the order in which they need to be issued are shown here:
Start the primary replication master:
shellM> mysqld --ndbcluster --server-id=1 \ --log-bin &
Start the secondary replication master:
shellM'> mysqld --ndbcluster --server-id=2 \ --log-bin &
Start the primary replication slave server:
shellS> mysqld --ndbcluster --server-id=3 \ --skip-slave-start &
Start the secondary replication slave:
shellS'> mysqld --ndbcluster --server-id=4 \ --skip-slave-start &
Finally, initiate replication on the primary channel by executing the
START SLAVE
statement on the primary slave as shown here:WarningOnly the primary channel is to be started at this point. The secondary replication channel is to be started only in the event that the primary replication channel fails, as described in Section 22.6.8, “Implementing Failover with NDB Cluster Replication”. Running multiple replication channels simultaneously can result in unwanted duplicate records being created on the replication slaves.
As mentioned previously, it is not necessary to enable binary logging on replication slaves.
Traduction non disponible
Le manuel MySQL n'est pas encore traduit en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Document créé le 26/06/2006, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/mysql-rf-mysql-cluster-replication-two-channels.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.