# Replicate same schema from two master and insert into Slave

**URL:** <https://forums.percona.com/t/replicate-same-schema-from-two-master-and-insert-into-slave/5040>\
**Category:** Percona Server for MySQL 5.7\
**Created:** [August 19, 2016, 2:09am UTC](https://forums.percona.com/t/replicate-same-schema-from-two-master-and-insert-into-slave/5040 "2016-08-19T02:09:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahesh\_P](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mahesh_p/32/1039_2.png) [@Mahesh\_P](https://forums.percona.com/u/Mahesh_P)\
**Post date:** [August 19, 2016, 2:09am UTC](https://forums.percona.com/t/replicate-same-schema-from-two-master-and-insert-into-slave/5040/1 "2016-08-19T02:09:31Z")

</div>

Hello Support ,

We are using Percona Server 5.7.14 and we want to achieve something like this:

1. Master A has schema : Sakila
2. Master B has schema : Sakila

Now There is a Slave C which has Schema Sakila\_1 and Sakila\_2.  
We want to two use two channels one for Master A and one for Master B.

Please let us know what config change we need to do on Slave C (specific to replicate\_rewrite\_db) and multiple replication channels how we should start.

[mysqld]

masterA.replicate-rewrite-db = sakila → sakila\_1

masterB.replicate-rewrite-db=sakila → sakila\_2  
…

Please let us know your thoughts on this.  
I was going through this blog and thought may be possible with Percona server too - [url][https://mariadb.com/blog/multisource-replication-how-resolve-schema-name-conflicts[/url]](https://mariadb.com/blog/multisource-replication-how-resolve-schema-name-conflicts%5B/url%5D)

Any inputs would be appreciated.

Many Thanks,  
Mahesh
