B
B
BudNejnee2021-10-14 13:12:29
MySQL
BudNejnee, 2021-10-14 13:12:29

How to add a new database to Master-Master (binlog)?

Hello,

There is MySQL 8 Master-Master. The replicated databases are set via the binlog_do_db config
On one of the servers, a new database was started without warning and it is already full

Now we have to add replication of this database to the 2nd server

As I see this process:
1. Create a database on server 2
binlog on server 1 and restart the subd
3. Record the position of the master on server 1
4. Stop the slave on servers 1 and 2
5. Redump the database from server 1 to server 2
6. Start the slave on server 2
7. Add a rule to the config for maintaining binlog on server 2 and restart the subd
8. How replication from server 1 to server 2 is aligned, we start the slave on server 1

But in my opinion this is somehow not reliable
. Is there a simpler way or is it possible (most likely) there are errors in my scheme?

PS If it matters - writing to databases only from server 1

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question