# Exclude a database

**URL:** <https://forums.percona.com/t/exclude-a-database/2458>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [August 8, 2012, 6:50am UTC](https://forums.percona.com/t/exclude-a-database/2458 "2012-08-08T06:50:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![azigui](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@azigui](https://forums.percona.com/u/azigui)\
**Post date:** [August 8, 2012, 6:50am UTC](https://forums.percona.com/t/exclude-a-database/2458/1 "2012-08-08T06:50:38Z")

</div>

Hi,

How can I exclude a database from the replication ?

Thx

Best regards

Azigui

---

<div class="post-metadata">

**Author:** ![niljoshi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/niljoshi/32/16889_2.png) [@niljoshi](https://forums.percona.com/u/niljoshi)\
**Post date:** [August 14, 2012, 1:41am UTC](https://forums.percona.com/t/exclude-a-database/2458/2 "2012-08-14T01:41:37Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![lefred](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lefred/32/16885_2.png) [@lefred](https://forums.percona.com/u/lefred)\
**Post date:** [August 14, 2012, 2:08am UTC](https://forums.percona.com/t/exclude-a-database/2458/3 "2012-08-14T02:08:49Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![azigui](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@azigui](https://forums.percona.com/u/azigui)\
**Post date:** [August 14, 2012, 9:27am UTC](https://forums.percona.com/t/exclude-a-database/2458/4 "2012-08-14T09:27:43Z")

</div>

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
