# Creating a Asynchronous replica from an existing PXC

**URL:** <https://forums.percona.com/t/creating-a-asynchronous-replica-from-an-existing-pxc/3206>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [January 15, 2014, 12:50pm UTC](https://forums.percona.com/t/creating-a-asynchronous-replica-from-an-existing-pxc/3206 "2014-01-15T12:50:38Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![busque](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@busque](https://forums.percona.com/u/busque)\
**Post date:** [January 15, 2014, 12:50pm UTC](https://forums.percona.com/t/creating-a-asynchronous-replica-from-an-existing-pxc/3206/1 "2014-01-15T12:50:38Z")

</div>

Our current setup is Mysql Server 5.5 as MASTER → asynchronous replication → 3 Node PXC. We are using the PXC as read only replicas right now. The PXC is receiving all updates via asynchronous replication from the existing MASTER.

I need to create a new Asynchronous slave in our office, which we use for reporting but I want it’s Master to be one of the cluster members and not the existing master as that master will be shutdown once we migrate writes to the PXC.

I haven’t seen any documentation on this setup or how to create a asynchronous replica from an existing PXC. Of note, I have an existing replica from the old master already in the office. I would love to essentially use a change master statement if possible and not recreate it from scratch as it is quite large.

Any idea how to get this done?

Many thanks.

KB

---

<div class="post-metadata">

**Author:** ![percona.jayj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/percona.jayj/32/927_2.png) [@percona.jayj](https://forums.percona.com/u/percona.jayj)\
**Post date:** [January 16, 2014, 7:25am UTC](https://forums.percona.com/t/creating-a-asynchronous-replica-from-an-existing-pxc/3206/2 "2014-01-16T07:25:32Z")

</div>

The PXC node you want to master from obviously needs log-bin, log-slave-updates and everything else you’d normally do to setup a master.

Making a slave of it is just like making a slave of any other node: clone the master, build the slave. If you backup a cluster node, be sure it do it in a way that doesn’t invoke flow control on the cluster: [url][http://www.mysqlperformanceblog.com/2013/10/08/taking-backups-percona-xtradb-cluster-without-stalls-flow-control/[/url]](http://www.mysqlperformanceblog.com/2013/10/08/taking-backups-percona-xtradb-cluster-without-stalls-flow-control/%5B/url%5D)

If you are migrating an existing slave of MASTER to become a slave of a PXC node without re-clone, you’d need to:

a) stop writes on MASTER, wait for PXC to catch up  
b) CHANGE MASTER on slave to new PXC node’s current master binlog position  
c) restart writes on MASTER

If you can’t stop writes on the MASTER, then you’ll probably have to reclone your slave.

---

<div class="post-metadata">

**Author:** ![watanesachin](https://avatars.discourse-cdn.com/v4/letter/w/ecd19e/32.png) [@watanesachin](https://forums.percona.com/u/watanesachin)\
**Post date:** [March 29, 2014, 6:21am UTC](https://forums.percona.com/t/creating-a-asynchronous-replica-from-an-existing-pxc/3206/3 "2014-03-29T06:21:53Z")

</div>

how to configure Mysql Server 5.5 as MASTER asynchronous replication with 3 Node of PXC.

---

<div class="post-metadata">

**Author:** ![percona.jayj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/percona.jayj/32/927_2.png) [@percona.jayj](https://forums.percona.com/u/percona.jayj)\
**Post date:** [March 31, 2014, 3:59am UTC](https://forums.percona.com/t/creating-a-asynchronous-replica-from-an-existing-pxc/3206/4 "2014-03-31T03:59:38Z")

</div>

> [@watanesachin;13852](#):
>
> how to configure Mysql Server 5.5 as MASTER asynchronous replication with 3 Node of PXC.

Pretty much the same way, except you setup one one in the cluster as a slave to your master with CHANGE MASTER TO. The slave in question needs log-slave-updates to replicate changes it sees from the master to the rest of the cluster.

---

<div class="post-metadata">

**Author:** ![jreiners](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jreiners/32/961_2.png) [@jreiners](https://forums.percona.com/u/jreiners)\
**Post date:** [March 31, 2014, 9:03am UTC](https://forums.percona.com/t/creating-a-asynchronous-replica-from-an-existing-pxc/3206/5 "2014-03-31T09:03:55Z")

</div>

Jay, do you happen to know if there there an existing write up on how to accomplish this with PXC? I have one stack set by Marco, but looking to set up a second set of stacks as well.

---

<div class="post-metadata">

**Author:** ![watanesachin](https://avatars.discourse-cdn.com/v4/letter/w/ecd19e/32.png) [@watanesachin](https://forums.percona.com/u/watanesachin)\
**Post date:** [April 1, 2014, 7:51am UTC](https://forums.percona.com/t/creating-a-asynchronous-replica-from-an-existing-pxc/3206/6 "2014-04-01T07:51:10Z")

</div>

No jay i don’t want like this i need suppose i have one existing mysql server that working fine now i configure the PXC and its also working fine …but i need to configure the this that is… i need from EXISTING Mysql server data----to------PXC…thats means Existing mysql server is working in front end and pxc will work on back end…it means all entries come in existing mysql and its will diliver to pxc…is is possiable…

---

<div class="post-metadata">

**Author:** ![watanesachin](https://avatars.discourse-cdn.com/v4/letter/w/ecd19e/32.png) [@watanesachin](https://forums.percona.com/u/watanesachin)\
**Post date:** [April 1, 2014, 11:57pm UTC](https://forums.percona.com/t/creating-a-asynchronous-replica-from-an-existing-pxc/3206/7 "2014-04-01T23:57:08Z")

</div>

can you please reply for above mention problem/…

---

<div class="post-metadata">

**Author:** ![percona.jayj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/percona.jayj/32/927_2.png) [@percona.jayj](https://forums.percona.com/u/percona.jayj)\
**Post date:** [April 2, 2014, 11:26am UTC](https://forums.percona.com/t/creating-a-asynchronous-replica-from-an-existing-pxc/3206/8 "2014-04-02T11:26:14Z")

</div>

> [@watanesachin;13893](#):
>
> No jay i don’t want like this i need suppose i have one existing mysql server that working fine now i configure the PXC and its also working fine …but i need to configure the this that is… i need from EXISTING Mysql server data----to------PXC…thats means Existing mysql server is working in front end and pxc will work on back end…it means all entries come in existing mysql and its will diliver to pxc…is is possiable…

Fine, you just backup the existing mysql server and restore that on your first cluster node (the node you bootstrap). After the cluster is setup, one node in the cluster must replicate from the existing master (standard async mysql replication) as I mentioned above.

This is very similar to any HOWTO you may find on the internet about setting up a mysql slave. I cannot write you a full set of steps here.

---

<div class="post-metadata">

**Author:** ![watanesachin](https://avatars.discourse-cdn.com/v4/letter/w/ecd19e/32.png) [@watanesachin](https://forums.percona.com/u/watanesachin)\
**Post date:** [April 3, 2014, 12:24am UTC](https://forums.percona.com/t/creating-a-asynchronous-replica-from-an-existing-pxc/3206/9 "2014-04-03T00:24:25Z")

</div>

when i am putting the the master entries in my.cnf file of pxc node the service cannot be up…here it is my.cnf file  
[mysqld]

skip-name-resolve

datadir=/var/lib/mysql  
user=mysql

# Path to Galera library

wsrep\_provider=/usr/lib64/libgalera\_smm.so

# Cluster connection URL contains IPs of node#1, node#2 and node#3

wsrep\_cluster\_address=gcomm://192.168.3.248,192.168.8.23,192.168.8.22

# In order for Galera to work correctly binlog format should be ROW

binlog\_format=ROW

# MyISAM storage engine has only experimental support

default\_storage\_engine=InnoDB

# This is a recommended tuning variable for performance

innodb\_locks\_unsafe\_for\_binlog=1

# This changes how InnoDB autoincrement locks are managed and is a requirement for Galera

innodb\_autoinc\_lock\_mode=2

# Node #3 address

wsrep\_node\_address=192.168.8.23

# Cluster name

wsrep\_cluster\_name=my\_centos\_cluster

# SST method

wsrep\_sst\_method=xtrabackup

#Authentication for SST method  
wsrep\_sst\_auth=“sstuser:s3cret”

max\_allowed\_packet=64

server-id = 2

master-host=192.168.3.215  
master-connect-retry=60  
master-user=sk  
master-password=centos  
relay-log = /var/lib/mysql/mysql-relay-bin  
relay-log-index = /var/lib/mysql/mysql-relay-bin.index  
log-error = /var/lib/mysql/mysql.err  
master-info-file = /var/lib/mysql/mysql-master.info  
relay-log-info-file = /var/lib/mysql/mysql-relay-log.info  
log-bin = mysql-bin

---

<div class="post-metadata">

**Author:** ![watanesachin](https://avatars.discourse-cdn.com/v4/letter/w/ecd19e/32.png) [@watanesachin](https://forums.percona.com/u/watanesachin)\
**Post date:** [April 4, 2014, 6:27am UTC](https://forums.percona.com/t/creating-a-asynchronous-replica-from-an-existing-pxc/3206/10 "2014-04-04T06:27:39Z")

</div>

hi,  
can we change the data location DIR…if yes how?

please reply
