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.

Our QA environment has all it's database names suffixed with "test". For example dbname1 in production would have a counterpart dbname1test in QA. (This is largely to help protect against prod/qa configs getting mixed up).

There are a handful of tables I would like to replicate the actual production tables into QA. I'm not sure how I would go about telling it to say "replicate from dbname1 there to dbname1test there"

Is this even possible?

share|improve this question

1 Answer 1

up vote 8 down vote accepted

Yes, there is. Put this in your my.cnf file:

replicate-rewrite-db="dbname1->dbname1test"

http://dev.mysql.com/doc/refman/5.0/en/replication-options-slave.html#option_mysqld_replicate-rewrite-db

share|improve this answer
    
Thank you, and my apologies for missing this in the docs. –  atxdba Sep 17 '11 at 16:31

Your Answer

 
discard

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.