Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Sv translation
languageen

So far no data has been uploaded to the master (master is empty)

This only works if no data at all has been imported into the databases. 


So the databases are completely empty (except for the configuration so far).

In this case the replication can simply be initialized as follows:

Translations Ignore


Code Block
titleMySQL Commands for Replication Initialisation
# To the respective master (also for master-master)
mysql> SHOW MASTER STATUS\G

# To the slave
# Here adjust <acd-dbm> as well as <Name Logfile> and <Position LogFile>:
mysql> CHANGE MASTER TO MASTER_HOST='<acd-dbm>',MASTER_USER='repl',MASTER_PASSWORD='<passwort>',MASTER_LOG_FILE='<Name LogFile>', MASTER_LOG_POS=<Position LogFile>;

# Start Slave
mysql> START SLAVE;

# Check status
mysql> SHOW SLAVE STATUS\G




Data has been imported (master is not empty)

Depending on which architecture is installed, the replication is set up as on the linked pages:

Hint:

  • the Replication can also be restored as if it had been done before - there is no need to distinguish between a first installation and a restore.

Restore MySQL Master Slave Replication wiederherstellen

Restore MySQL Master-Master Replikation wiederherstellenReplication

Sv translation
languagede

Bisher wurden keine Daten auf den Master eingespielt (Master ist leer)

Dies funktioniert nur dann, wenn überhaupt keine Daten in den Datenbanken eingespielt wurden. 


Die Datenbanken sind also komplett leer (bis auf die Konfiguration bisher).

In diesen Fall kann die Replikation einfach wie folgt initialisiert werden:

Translations Ignore


Code Block
titleMySQL Commands for Replication Initialisation
# To the respective master (also for master-master)
mysql> SHOW MASTER STATUS\G

# To the slave
# Here adjust <acd-dbm> as well as <Name Logfile> and <Position LogFile>:
mysql> CHANGE MASTER TO MASTER_HOST='<acd-dbm>',MASTER_USER='repl',MASTER_PASSWORD='<passwort>',MASTER_LOG_FILE='<Name LogFile>', MASTER_LOG_POS=<Position LogFile>;

# Start Slave
mysql> START SLAVE;

# Check status
mysql> SHOW SLAVE STATUS\G




Daten wurden eingespielt (Master ist nicht leer)

Je nach dem welche Architektur installiert wird, wird die Replikation wie auf den verlinkten Seiten eingerichtet:

Hinweis:

  • Die Replikation kann auch wiederhergestellt werden, als ob es vorher gelaufen wäre - es gibt keine Notwendikeit zwischen einer Erstinstallation oder Wiederherstellung zu unterscheiden.

Restore MySQL Master Slave Replication wiederherstellen

Restore MySQL Master-Master Replikation wiederherstellenReplication