# Moving from "1 Master to 2 Slaves" Replication to Percona Cluster

**URL:** <https://forums.percona.com/t/moving-from-1-master-to-2-slaves-replication-to-percona-cluster/6221>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [February 28, 2018, 8:28am UTC](https://forums.percona.com/t/moving-from-1-master-to-2-slaves-replication-to-percona-cluster/6221 "2018-02-28T08:28:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dirk23](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@Dirk23](https://forums.percona.com/u/Dirk23)\
**Post date:** [February 28, 2018, 8:28am UTC](https://forums.percona.com/t/moving-from-1-master-to-2-slaves-replication-to-percona-cluster/6221/1 "2018-02-28T08:28:17Z")

</div>

Hi.

I installed MySQL 5.7 on Ubuntu 16.04 via apt and created a Database for our Developers. Now i added 2 Slaves to that Master DB Server in the hope that i can migrate these 3 Servers to a Percona Cluster.

What i did is:  
Installing 3 Servers Ubuntu 126.04 and MySQL 5.7 Server via apt from the Ubuntu Sources.  
Created one Master and 2 Slaves Replication (wich is working fine)  
On 3rd. Server uninstalled mysql 5.7 server and backed up /var/lib/mysql folder as well as /etc/mysql/mysql.conf.d/mysqld.cnf  
added percona Sources to apt like in this How-To: [url][https://www.percona.com/doc/percona-repo-config/apt-repo.html[/url]](https://www.percona.com/doc/percona-repo-config/apt-repo.html%5B/url%5D)  
try to install percona xtradb cluster server via apt. But that ended in an error and xtradb server could not be installed.

Is there a How-To or some more information on how to move from standard MySQL 5.7 Server (with slaves) to a Percona Cluster?

regards

Dirk

---

<div class="post-metadata">

**Author:** ![krunalbauskar](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@krunalbauskar](https://forums.percona.com/u/krunalbauskar)\
**Post date:** [March 1, 2018, 10:01pm UTC](https://forums.percona.com/t/moving-from-1-master-to-2-slaves-replication-to-percona-cluster/6221/2 "2018-03-01T22:01:17Z")

</div>

I presume you got it pxc cluster working as per this thread. [url][https://www.percona.com/forums/questions-discussions/percona-xtradb-cluster/49821-installing-percona-xtradb-cluster-on-ubuntu-16-04[/url]](https://www.percona.com/forums/questions-discussions/percona-xtradb-cluster/49821-installing-percona-xtradb-cluster-on-ubuntu-16-04%5B/url%5D)

---

<div class="post-metadata">

**Author:** ![Dirk23](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@Dirk23](https://forums.percona.com/u/Dirk23)\
**Post date:** [April 16, 2018, 6:05am UTC](https://forums.percona.com/t/moving-from-1-master-to-2-slaves-replication-to-percona-cluster/6221/3 "2018-04-16T06:05:10Z")

</div>

I have a clean installation of Percona Cluster running, but my new task is now to migrate from MySQL Master with 2 Slaves to Percona Xtra DB Cluster.

---

<div class="post-metadata">

**Author:** ![krunalbauskar](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@krunalbauskar](https://forums.percona.com/u/krunalbauskar)\
**Post date:** [April 16, 2018, 11:03pm UTC](https://forums.percona.com/t/moving-from-1-master-to-2-slaves-replication-to-percona-cluster/6221/4 "2018-04-16T23:03:45Z")

</div>

There are multiple options. You probably get in touch with Percona consulting they can help you migrate in safer and quicker way.

Here is a process that generally is a way to go:

- You can configure PXC cluster to act as async slave and let it replicate from the master (through async replication).

- Once PXC server has caught up with MASTER and then replication lag is down to 0, you can then simply switch over your application to use PXC cluster and turn-off existing MASTER and slave.

---

<div class="post-metadata">

**Author:** ![Dirk23](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@Dirk23](https://forums.percona.com/u/Dirk23)\
**Post date:** [April 17, 2018, 12:24am UTC](https://forums.percona.com/t/moving-from-1-master-to-2-slaves-replication-to-percona-cluster/6221/5 "2018-04-17T00:24:17Z")

</div>

So there is no way to turn a MySQL 5.7 from Ubuntu Repositories into i Cluster?  
Do i understand you correct:

- create a new Cluster with 3 Nodes
- add one Node as Slave to the Master
- when Slave caugth up with master change Application access from Master to Cluster

That sounds like a simple thing to do.

One possible Scenario for me would also be to just “copy” the Data from Singel MySQL Server to the Cluster, but i had my problems coping the data from the master to a Percona Cluster Server. What would be the best way to… lets say “dump” the data from the Master to a working PXC? (mysqldump didnt do what i wanted it to do, iirc)

---

<div class="post-metadata">

**Author:** ![Dirk23](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@Dirk23](https://forums.percona.com/u/Dirk23)\
**Post date:** [May 3, 2018, 3:33am UTC](https://forums.percona.com/t/moving-from-1-master-to-2-slaves-replication-to-percona-cluster/6221/6 "2018-05-03T03:33:55Z")

</div>

No Suggestions on my Question on how to just copy the data?
