0

I have two different servers(A1, B1) with mysql-5.1.73 and currently, I'm replicating DBs with another two servers(A2, B2).

I would like to know is it possible to do a centralized DB replication, which means replicating DBs of both Master_A1 and Master_B1 to a single Slave_A2.

P.S: database and their table names will be same in both Master servers.

Siva
  • 101
  • 3
  • Not with the antique 5.1. – Rick James Jun 20 '18 at 15:23
  • @RickJames is it possible with any other version? – Siva Jun 21 '18 at 07:01
  • Yes. Newer versions of MySQL 5.6(?) and MariaDB 10.0 can handle multiple Masters replicating to a single Slave. That was about 5 years ago. Development on 5.1 ended about 8 years ago. Look for phrases like "multi-source replication". – Rick James Jun 21 '18 at 17:41
  • @Rick James is it possible with same DB name in both masters ? – Siva Jun 21 '18 at 17:51
  • I doubt that you could replicate to the same table(s), since there is no "conflict resolution". Use a VIEW with a UNION on the receiving Slave? – Rick James Jun 21 '18 at 17:55
  • @Rick James or is it possible to have multiple mysql instance in slave to achieve this? Just like multiple tomcats running on different ports. – Siva Jun 21 '18 at 18:05
  • Two Tomcats (or even two threads in one tomcat) can talk to different servers. But then what? One thread in one tomcat could connect to both masters with separate connections, but then what? – Rick James Jun 21 '18 at 19:47

0 Answers0