Score:0

2 servers, 2 databases on each, 1st server 1st db master and 2nd slave, 2nd server 1st db slave, 2nd master, is it possible?

th flag

I have 2 MySQL/MariaDB servers each of them with its own database and I would like to set up a continuous backup on each other via replication.

Is it possible to make 1 DB master and 1 slave on each one of the servers?

Server 1         Server 2

db1 (master)     db1 (slave)
db2 (slave)      db2 (master)

Or is there a better option to do it? But I would like to have ready-to-use DB(no dump files) in case of a failure of one of the servers so I can quickly switch to another.

in flag
Start with db1 master + slave - "easy binlog replication" then do it the other way around. If the do not have conflicting databases or users, you could even run master+slave in same instance.
Michael Hampton avatar
cz flag
Sure you could do that. I'm a bit surprised that you didn't just do it. What is the problem you are having?
ua flag
Your specific use pattern is abnormal but feasible. Search for "dual master" or "master-master".
th flag
@NiKiZe I see, so its like master-master but with different options in `binlog_do_db`, thanks, I set it up!
th flag
@RickJames I've heard about it, and after setting up I realized I can set different `binlog_do_db` values on each server so it will be exactly like I wanted! Thanks!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.