0

My question is:

Am I able to have one database server as slave to more than one master servers with different databases. So for example:

  • DB-Server-1 contains database Apple
  • DB-Server-2 contains database Banana
  • I want to replicate them to my DB-Server-3 as Apple-Slave and Banana-Slave

If I'm able, can you tell me how to achieve this with MySQL 5.7?

Bert
  • 984
  • 1
  • 11
  • 29

1 Answers1

3

In MySQL jargon that is called "multi-source replication" and that is a supported configuration in MySQL 5.7.

The MySQL manual comes with a complete tutorial:
https://dev.mysql.com/doc/refman/5.7/en/replication-multi-source.html

MySQL Multi-Source Replication enables a replication slave to receive transactions from multiple sources simultaneously. Multi-source replication can be used to:

  • back up multiple servers to a single server,
  • to merge table shards,
  • consolidate data from multiple servers to a single server.

Multi-source replication does not implement any conflict detection or resolution when applying the transactions, and those tasks are left to the application if required. In a multi-source replication topology, a slave creates a replication channel for each master that it should receive transactions from.

etc.

HBruijn
  • 72,524
  • 21
  • 127
  • 192