Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I got database1 on server1 and database2 on server2.

Now I need to replicate a single table from database1 to database2

Now I thought that this would work:

  replicate-ignore-table  = %
  replicate-do-table      = table
  replicate-rewrite-db    = "database1->database2"

but this does not seem to work as mysql does not accept % symbol with replicate-ignore-table directive. any ideas ?


I have tried :

  replicate-ignore-table  = database1.%
  replicate-do-table      = database1.table
  replicate-rewrite-db    = "database1->database2"

Now mysql is starting, but table is not being replicated.

share|improve this question
+1 for answering you own question with a bit of lunch time. – RolandoMySQLDBA Nov 24 '12 at 3:03
up vote 3 down vote accepted

So I had some lunch and figured it out !

  replicate-do-table      = database2.table
  replicate-rewrite-db    = "database1->database2"
share|improve this answer
I am glad to figured this one out yourself. I have something to share with you: replicate-ignore-table and replicate-do-table cannot be mixed any more than scotch and blood pressure meds. ( See my ServerFault post under possibility #6 along with… ) You get a +1 for removing replicate-ignore-table = database1.% to solve it. – RolandoMySQLDBA Nov 24 '12 at 3:02
replicate-ignore-table  = database1.%
replicate-do-table      = database1.table
replicate-rewrite-db    = "database1->database2"

due to what you configured and refer to MySQL docs, the mistake in your configuration is that, you are rewriting the db (which will done before any replication rule) 1->2, and then filtering replication on DB1.

check replication execution rules, flow chart.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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