# Migrate 2 DC MySQL cluster to 3 DC

**URL:** <https://forums.percona.com/t/migrate-2-dc-mysql-cluster-to-3-dc/29948>\
**Category:** Percona XtraDB Cluster 5.x\
**Tags:** mysql, percona\
**Created:** [April 29, 2024, 2:32pm UTC](https://forums.percona.com/t/migrate-2-dc-mysql-cluster-to-3-dc/29948 "2024-04-29T14:32:39Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![shirisha](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/shirisha/32/17995_2.png) [@shirisha](https://forums.percona.com/u/shirisha)\
**Post date:** [April 29, 2024, 2:32pm UTC](https://forums.percona.com/t/migrate-2-dc-mysql-cluster-to-3-dc/29948/1 "2024-04-29T14:32:39Z")

</div>

Hello

I have two DC MySQL cluster with master-master setup. So I have one master and two slaves in each dc. Currently I want to add third DC so that I have a backup in a scenario such as a DC goes down. MySQL Ver 14.14 Distrib 5.7.31-34.  
Can you please help me with the steps to achieve this?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [April 30, 2024, 1:26pm UTC](https://forums.percona.com/t/migrate-2-dc-mysql-cluster-to-3-dc/29948/2 "2024-04-30T13:26:52Z")

</div>

Hello @shirisha,  
I would recommend using Percona XtraDB Cluster (PXC) to create a 3-node cluster between your DCs. 1 MySQL server in each DC, connects to the other 2 DCs in a synchronously replicated setup. We have lots of documentation on our website for how to setup a 3-node PXC.

> [@shirisha](#):
>
> MySQL Ver 14.14 Distrib 5.7.31-34

This version of MySQL is completely dead. You should start your new cluster using MySQL 8.0.

---

<div class="post-metadata">

**Author:** ![shirisha](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/shirisha/32/17995_2.png) [@shirisha](https://forums.percona.com/u/shirisha)\
**Post date:** [May 6, 2024, 5:37pm UTC](https://forums.percona.com/t/migrate-2-dc-mysql-cluster-to-3-dc/29948/3 "2024-05-06T17:37:32Z")

</div>

Hello @matthewb  
What is the latest MySQL version that I can upgrade from Percona Server 5.7.31 ?  
The latest tarball file I have for 8.0 version is 8.0.30, can I install this version or what is the latest version I can install w.r.t 8.0 version. I’m aware that we have 8.0.33 , but did not find the binary file for this version.  
I was checking the below link.

> **[Percona Server for MySQL - Binary tarballs available](https://docs.percona.com/percona-server/8.0/binary-tarball-names.html)**
>
> For later version of Percona Server for MySQL, the tar files are organized by the glibc2 version. You can find this version on your operating system with the following command:

Thanks,  
Shirisha

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [May 6, 2024, 7:16pm UTC](https://forums.percona.com/t/migrate-2-dc-mysql-cluster-to-3-dc/29948/4 "2024-05-06T19:16:56Z")

</div>

@shirisha You can upgrade to any 8.0.\* version from 5.7.  
8.0.30 is a bit old. I would go for latest 8.0.36.

Please use [Software Downloads - Percona](https://www.percona.com/downloads) and all versions, tarballs, are here.

---

<div class="post-metadata">

**Author:** ![shirisha](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/shirisha/32/17995_2.png) [@shirisha](https://forums.percona.com/u/shirisha)\
**Post date:** [May 7, 2024, 7:20pm UTC](https://forums.percona.com/t/migrate-2-dc-mysql-cluster-to-3-dc/29948/5 "2024-05-07T19:20:32Z")

</div>

@matthewb I ran the mysql upgrade checker utility and see the below warnings. Could you please help me here.

1. Usage of utf8mb3 charset - MySQL version 5.7 was using default utf8mb3, do I need to alter these tables to set to utf8mb4 after upgrade to 8.0 or it’s automatically taken care by upgrade ?  
abc\_user - schema’s default character set: utf8  
abc\_user.acl - column’s default character set: utf8

2. Zero Date, Datetime, and Timestamp values - Do I need to make any changes to the default values for these tables ?  
abc.xyz - column has zero default value: 0000-00-00

Thanks  
Shirisha

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [May 7, 2024, 8:54pm UTC](https://forums.percona.com/t/migrate-2-dc-mysql-cluster-to-3-dc/29948/6 "2024-05-07T20:54:54Z")

</div>

1. Change this now to use utf8mb4. All your tables/columns should be utf8mb4. mb3 variant will be removed from 8.0 soon.
2. The all zero date (0000-00-00) is not valid in MySQL 8.0. Alter the default for that column now in 5.7 to a real date.

---

<div class="post-metadata">

**Author:** ![shirisha](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/shirisha/32/17995_2.png) [@shirisha](https://forums.percona.com/u/shirisha)\
**Post date:** [May 22, 2024, 3:14am UTC](https://forums.percona.com/t/migrate-2-dc-mysql-cluster-to-3-dc/29948/7 "2024-05-22T03:14:21Z")

</div>

What is the best way to alter big tables to use utf8mb4. When I have tables with huge data and multiple columns needs to be altered to utf8mb4, what is the best way to do in production environment ?

---

<div class="post-metadata">

**Author:** ![shirisha](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/shirisha/32/17995_2.png) [@shirisha](https://forums.percona.com/u/shirisha)\
**Post date:** [May 22, 2024, 3:31am UTC](https://forums.percona.com/t/migrate-2-dc-mysql-cluster-to-3-dc/29948/8 "2024-05-22T03:31:16Z")

</div>

In general default value for a timestamp column can be current\_timestamp similarly do we have anything for date column ?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [May 22, 2024, 4:21am UTC](https://forums.percona.com/t/migrate-2-dc-mysql-cluster-to-3-dc/29948/9 "2024-05-22T04:21:26Z")

</div>

> [@shirisha](#):
>
> similarly do we have anything for date column

Unfortunately, no, there is no default “current” date.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [May 22, 2024, 4:21am UTC](https://forums.percona.com/t/migrate-2-dc-mysql-cluster-to-3-dc/29948/10 "2024-05-22T04:21:40Z")

</div>

Please look at [pt-online-schema-change — Percona Toolkit Documentation](https://docs.percona.com/percona-toolkit/pt-online-schema-change.html)

---

<div class="post-metadata">

**Author:** ![shirisha](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/shirisha/32/17995_2.png) [@shirisha](https://forums.percona.com/u/shirisha)\
**Post date:** [May 30, 2024, 5:10pm UTC](https://forums.percona.com/t/migrate-2-dc-mysql-cluster-to-3-dc/29948/11 "2024-05-30T17:10:03Z")

</div>

@matthewb I have two DC Percona MySQL cluster with master-master setup, with each master having two slaves in each dc. Currently MySQL Ver 14.14 Distrib 5.7.31-34, now I want to upgrade to version 8.0. I’m planning to upgrade passive dc first (1master and 2slaves) and will monitor for few days only then switch traffic to the passive dc (which then becomes active) and then upgrade the other dc(which still is on version 5.7). So ideally there might be few days where the cluster will have two versions running , is this recommended ? Or can I workaround this scenario where I want to monitor the new version and only then switch traffic(considering I have completed testing in non-prod environments).
