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

Exclude a database

aziguiazigui ContributorCurrent User Role Beginner
Hi,

How can I exclude a database from the replication ?

Thx

Best regards

Azigui

Comments

  • niljoshiniljoshi MySQL Sage Inactive User Role Beginner
    Hi,

    Bit confused. Are you asking about PXC (master-master replication) or native MySQL Replication? Can you explain the scenario?

    If you are asking for native MySQL Replication than there are 2 ways to exclude a database from the replication.

    1. You can exclude it from master by replicating specific DBs which you want through "binlog-do-db" command
    (But, this is not recommended. Please check below post)
    http://www.mysqlperformanceblog.com/2009/05/14/why-mysqls-bi nlog-do-db-option-is-dangerous/

    2. You can exclude it on slave by adding option "replicate-wild-ignore-table=db.%" in my.cnf
  • lefredlefred Contributor Inactive User Role Beginner
    Azigui,

    If you were referring to Percona XtraDB Cluster's replication, then no, it's actually not yet possible to do so. Galera replication doesn't support yet local schemas or tables. The only thing you could do for local tables is to convert them into a different engine like myisam for example (if you don't enable its support in your cluster).

    Regards,
  • aziguiazigui Contributor Current User Role Beginner
    Hi Niljoshi,

    Thx for your response
    I add this option in the [MYSQLD] section in only my 2 slaves but without success

    Can you explain me why

    Best regards
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.