# Upgrading Percona MySQL 5.6 to 8.0 with Less Downtime

**URL:** <https://forums.percona.com/t/upgrading-percona-mysql-5-6-to-8-0-with-less-downtime/24619>\
**Category:** Percona Server for MySQL 8.0\
**Created:** [August 23, 2023, 9:39am UTC](https://forums.percona.com/t/upgrading-percona-mysql-5-6-to-8-0-with-less-downtime/24619 "2023-08-23T09:39:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![iytarou](https://avatars.discourse-cdn.com/v4/letter/i/a9adbd/32.png) [@iytarou](https://forums.percona.com/u/iytarou)\
**Post date:** [August 23, 2023, 9:39am UTC](https://forums.percona.com/t/upgrading-percona-mysql-5-6-to-8-0-with-less-downtime/24619/1 "2023-08-23T09:39:39Z")

</div>

Hello.

I am currently using Percona Server for MySQL 5.6.  
The server configuration consists of 3 units  
・1 Master  
・2 Standbys (that can be stopped.)

I want to upgrade Percona MySQL from 5.6 to 8.0.  
The problem is that we want to minimize downtime.

I prepared 5.7 and 8.0 environments and thought of a way to synchronize with a chained replication configuration, but MySQL does not support mixed-version replication.

5.6 → 5.7 → 8.0

Is there a better way in Percona MySQL?

---

<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:** [August 23, 2023, 4:10pm UTC](https://forums.percona.com/t/upgrading-percona-mysql-5-6-to-8-0-with-less-downtime/24619/2 "2023-08-23T16:10:49Z")

</div>

> [@iytarou](#):
>
> and thought of a way to synchronize with a chained replication configuration, but MySQL does not support mixed-version replication.
> 
> 5.6 → 5.7 → 8.0
> 
> Is there a better way in Percona MySQL?

This is absolutely correct! MySQL fully supports this. Set this up, use pt-table-checksum to check 5.6/5.7 and then repeat to check 5.7/8.0. If all of the data is the same, then you can cut over to 8.0 when you wish and remove the 5.6 and 5.7.

---

<div class="post-metadata">

**Author:** ![iytarou](https://avatars.discourse-cdn.com/v4/letter/i/a9adbd/32.png) [@iytarou](https://forums.percona.com/u/iytarou)\
**Post date:** [August 24, 2023, 1:03am UTC](https://forums.percona.com/t/upgrading-percona-mysql-5-6-to-8-0-with-less-downtime/24619/3 "2023-08-24T01:03:23Z")

</div>

Thank you!  
I would like to use the “pt-table-checksum” that I received in my reply!

Regarding migration from 5.6 to 8.0, it is desirable to be able to complete it in one maintenance.

Therefore, it would be very nice to be able to synchronize data to 8.0 in near real time while keeping the 5.6 environment running.

Mixed replication of 5.6 → 5.7 → 8.0 is deprecated in MySQL, so if you have a good idea, please let me know.

Sincerely,

---

<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:** [August 24, 2023, 4:44am UTC](https://forums.percona.com/t/upgrading-percona-mysql-5-6-to-8-0-with-less-downtime/24619/4 "2023-08-24T04:44:24Z")

</div>

> [@iytarou](#):
>
> Mixed replication of 5.6 → 5.7 → 8.0 is deprecated in MySQL

That is incorrect. It is not deprecated. Doing a chain of replication like this is the correct, best-practice, and recommended way to upgrade from 5.6 to 8.0.

> [@iytarou](#):
>
> I would like to use the “pt-table-checksum” that I received in my reply!

> **[Percona Toolkit Documentation](https://docs.percona.com/percona-toolkit/pt-table-checksum.html)**
>
> Command-line tools for common MySQL database administration tasks.

> [@iytarou](#):
>
> Therefore, it would be very nice to be able to synchronize data to 8.0 in near real time while keeping the 5.6 environment running.

Yes, that is why you would set up replication from 5.6-\>5.7-\>8.0. That will keep replication/synchronizing in real time from your current production to the new 8.0.

---

<div class="post-metadata">

**Author:** ![iytarou](https://avatars.discourse-cdn.com/v4/letter/i/a9adbd/32.png) [@iytarou](https://forums.percona.com/u/iytarou)\
**Post date:** [August 24, 2023, 5:07am UTC](https://forums.percona.com/t/upgrading-percona-mysql-5-6-to-8-0-with-less-downtime/24619/5 "2023-08-24T05:07:18Z")

</div>

The good news is that mixed replication is possible.  
One thing that bothers me is that the official MySQL documentation has the following description.

[https://dev.mysql.com/doc/mysql-replication-excerpt/8.0/en/replication-compatibility.html](https://dev.mysql.com/doc/mysql-replication-excerpt/8.0/en/replication-compatibility.html)

> if you are using a chained or circular replication setup, you cannot use MySQL 8.0.22, MySQL 8.0.24, and MySQL 8.0.28 concurrently, although you could use any two of these releases together.

If there is no problem with chain replication of 3 or more versions of Percona, I would like to proceed with the version upgrade by setting up replication of 5.6-\>5.7-\>8.0.

---

<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:** [August 24, 2023, 4:11pm UTC](https://forums.percona.com/t/upgrading-percona-mysql-5-6-to-8-0-with-less-downtime/24619/6 "2023-08-24T16:11:41Z")

</div>

That message says don’t create a chain using those 3 specific versions. You can create chained replication using 5.6, 5.7, and 8.0.
