Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Content imported from a Scroll Translations translation file.
Sv translation
languageen

No Data Loaded in Master

Note

This method only works if the database is empty. If the database is not empty, then replication should be restored as described below.

Status
colourRed
titleCaution Password

Translations Ignore


Code Block
# On the master
mysql> SHOW MASTER STATUS\G

# On the slave
# Use the values for <Name Logfile> and <Position LogFile> from the output above:
mysql> CHANGE MASTER TO MASTER_HOST='acd-dbm',MASTER_USER='repl',MASTER_PASSWORD='<password>',MASTER_LOG_FILE='<Name LogFile>', MASTER_LOG_POS=<Position LogFile>;

# On the slave - start the Slave
mysql> START SLAVE;

# On the slave - check status
mysql> SHOW SLAVE STATUS\G


Simple Master Slave

For a simple master slave installation, the above commands will be input only once.

Master-Master Replication

For Master-Master replication with two additional slaves, the replication is setup as follows:

WhatMasterSlave
Replicate the first master to the second master.acd-dbm1acd-dbm2
Replicate the second master to the first master.acd-dbm2acd-dbm1
Replicate the first master to the first slave. acd-dbm1acd-dbs1
Replicate the second master to the second slave. acd-dbm2acd-dbs2

Master is not Empty

If the master is not empty, then use one of the following pages to reconstruct replication:

Restore MySQL Master Slave Replication

Restore MySQL Master-Master Replication

Sv translation
languagede

Status
colourRed
titleThis page is only available in English

Sv translation
languagefr

Aucune donnée chargée dans le Maître

Note

Cette méthode ne fonctionne que si la base de données est vide. Si la base de données n'est pas vide, la réplication doit être restaurée comme décrit ci-dessous.

Status
colourRed
titleMot de passe de précaution

Translations Ignore


Code Block
# Sur le maître mysql> SHOW MASTER STATUS\G # Sur l'esclave # Utilisez les valeurs pour <Name Logfile> et <Position LogFile> de la sortie ci-dessus: mysql> CHANGE MASTER TO MASTER_HOST = 'acd-dbm', MASTER_USER = ' repl ', MASTER_PASSWORD =' <mot de passe> ', MASTER_LOG_FILE =' <Name LogFile> ', MASTER_LOG_POS = <Position LogFile>; # Sur l'esclave - démarrer l'esclave mysql> START SLAVE; # Sur l'esclave - vérifier l'état mysql> SHOW SLAVE STATUS\G


Maître esclave simple

Pour une simple installation maître-esclave, les commandes ci-dessus ne seront saisies qu'une seule fois.

Réplication Maître-Maître

Pour la réplication maître-maître avec deux esclaves supplémentaires, la réplication est configurée comme suit :

QuoiMaîtreEsclave
Reproduisez le premier maître au second maître.acd-dbm1acd-dbm2
Reproduisez le deuxième maître au premier maître.acd-dbm2acd-dbm1
Reproduisez le premier maître au premier esclave. acd-dbm1acd-dbs1
Reproduisez le deuxième maître au deuxième esclave. acd-dbm2acd-dbs2

Le maître n'est pas vide

Si le master n'est pas vide, utilisez l'une des pages suivantes pour reconstruire la réplique :

Restore MySQL Master Slave Replication

Restore MySQL Master-Master Replication