Mysql – Add a new table to replicate without restarting MySQL

MySQLreplication

I already have replication set up for, say, dbname. I want to add a new replicated table. I created the tables on both master and slave. I entered replicate-do-table=dbname.tablename to my.cnf on slave.

To reload my.cnf the server needs to be restarted, and since lots of queries are coming I don't want to lose any of them.

Is there a way that I can add a new table to be replicated on the fly?

Best Answer

No, there is no way that you can add tables to replication on the fly.

You can read it in the docs:

Others, such as the --replicate-* options, can be set only when the slave server starts.

Related Topic