Take the 2-minute tour ×
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. It's 100% free, no registration required.

I'd like a slave to replicate all tables of a given database except for those starting with some pattern, eg. those with names starting with 'nc' (non-critical, redundant denormalized tables). So I thought that

replicate_wild_do_table = dbname.%
replicate_wild_ignore_table = dbname.nc%

would do the job.

However, reading the

replication rules (http://dev.mysql.com/doc/refman/5.5/en/replication-rules-table-options.html)

it seems that the replicate_wild_do_table rule has precedence over the replicate_wild_do_table one, thus resulting in tables names nc% being replicated.

Hence my question: How to replicate all tables (% wildcard) AND exclude those with a pattern?

An obvious workaround would be to give the complement pattern in replicate_wild_do_table but that's not very elegant (we can't use regexp here, can we?).

Question 2: Is there an obvious reason why MySQL performs the replicate-wild-do-table rules before the replicate-wild-ignore-table ones? This order seems counter-intuitive to me.

share|improve this question
    
Ahah, tumbleweed… –  okiharaherbst Feb 26 at 12:04
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.