0

"I have successfully set up regular master-slave replication, but now I need to configure a more complex setup. Currently, I have one master database and 15 slave databases. My goal is to replicate the 'test DB' database from the master to all 15 slaves. Additionally, I need to replicate the 'test DB completed' database from each of the 15 slaves back to the master. Could you please provide guidance on how to achieve this configuration?"

2
  • This reads like a prompt for a large language model AI. As it stands, this question is probably too broad for a question-and-answer site like dba.se
    – Hannah Vernon
    Commented Apr 17 at 18:11
  • Just use Galera. Commented Apr 18 at 22:59

2 Answers 2

0

I dont't knows about Mysql but it quite easy with mariadb version 10 and up which support multi master.

  • make all satellite replicate the master databases.
  • on master server.cnf set : log_slave_updates = 1
  • on satellite server.cnf set : log_slave_updates = 0

for each satellite do on master

  • CHANGE MASTER '<satelliteX>' TO MASTER_HOST='<IP satellite>', MASTER_USER='replication', MASTER_PASSWORD='pass', ...
  • start all slaves

that's it

0

If all you need is to send "test completed" to the master, then allow the test program to access the Master to do that write. Then think about whether to replicate that info (eg by limiting the replication of that "finished" db). Also allow limit GRANTs as appropriate.

I don't think there is a way to set up some databases replicating one way and others going the other way. And I cringe at thinking of how to recover from the crash of one server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.