Not the answer you need?
Register and ask your own question!

Is there a way to slave a single database?

carock96carock96 EntrantCurrent User Role Beginner
I would like to setup a slave/master server for high availability databases from multiple MySQL servers.

Is there a way to slave replicate only a specific database from a server instead of master/slave the whole MySQL server instance?

I would like to end up with a MySQL server that acts as a slave or master for originating databases spread across multiple servers.

So I have several MySQL servers already in place, but only replicate/slave certain high traffic databases from each of those servers to a heavy duty MySQL server.

Thanks,
Chuck

Comments

  • psongpsong Contributor Inactive User Role Beginner
    Chuck,

    Certainly, you can use replication filtering rules to achieve that. For example, on the slave, add to the my.cnf file:

    replicate-wild-do-table =<db1>.%

    Please read about replication filtering rule in the documentation: http://dev.mysql.com/doc/refman/5.6/en/replication-rules.html. There are some details on why filtering on the slave side is preferred, and why replicate-wild-do-table is safer than replicate-do-db.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.