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

We need to run some very ugly queries on a MySQL replication cluster.

Does anyone know if creating a view directly on the slave will break the replication of the other, otherwise untouched data synced with the master?

share|improve this question
up vote 5 down vote accepted

This will work fine. The only caveat is that if you, in the future, create a view on the master with the same view name, in the same schema, replication will stop due to the conflict.

Another potentially useful thing you can do -- quite safely -- on a slave server is adding indexes to base tables to help your reporting queries, even if the same index wouldn't be needed or justified on the master. Of course, you should not add unique indexes or foreign keys directly to the slave, since these could cause conflicts and don't really make sense when not on the master ...but ordinary single and multi-column indexes are also safe to add directly to a slave.

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.