Upgrade from MySQL v5.5.59 to Percona 5.6? 5.7? XtraDB?

Hello there,

On our QA environments we are running Debian 9, Keycloak 3.4.3 and Percona “MySQL” XtraDB 5.7.33-36. We have a bunch of backends working fine with XtraDB.

On Production we were running Debian 8 “don’t ask”, and I upgraded Keycloak from 3.2.1 to 3.4.3 last year, and we have a local MySQL 5.5.59 for the Keycloak application. The Keycloak 3.2.1 version didn’t handle primary keys then that is why, they setup that local “old” MySQL 5.5.59 a few years ago. With Keycloak 3.4.3, it uses primary keys, then it can be setup on the Percona XtraDB, like we have it on QAs.

I recently upgraded from Debian 8 to Debian 9 our Production servers but on Debian 9 tried to go with MariaDB and the MySQL was not even starting, then I rolled back the virtual machine, and I apt hold to keep the related MySQL packages. Plus, I like a lot Percona productions, I dislike MariaDB… like a lot.

Then now, we are on Debian 9, same Keycloak 3.4.3 and the old MySQL 5.5.59

Then for the database, I was wondering what would be better. The end goal will be to stop using the local MySQL 5.5.59 and move the Keycloak data to our Percona XtraDB “cluster” running v.5.7.33-36 like we have on our QAs environments.

I have read people recommending to upgrade MySQL 5.5.x to 5.6.latest, then 5.6.latest to 5.7. Which if I do, I will be using the Percona MySQL 5.6 and eventually Percona MySQL 5.7. I know once I am on version 5.7 I should be able to grab the data and move into the Percona Xtradb 5.7.33-36 “cluster”.

Any suggestions?

1 Like

Hello @jbiancot,
For your upgrade process, yes, upgrade the local 5.5 to 5.6, then to 5.7. Then you can install/replace the Percona MySQL packages with Percona XtraDB packages. Configure PXC appropriately and bootstrap this server. You now have a cluster of 1 with the same data. Spin up node 2 and it will SST the dataset from node 1.

Your other option, is to do a logical dump of 5.5 and import to an already running 5.7 PXC.

1 Like

Hi @matthewb thanks for the comment.

We are running already a Percona XtraDB “MySQL” cluster, with 4 nodes in our Production environment.

What I meant, I guess the my roadmap would be:

  1. install Percona standalone MySQL 5.6 to upgrade the MySQL “non Percona” 5.5.59 into this Persona standalone MySQL 5.6

  2. then upgrade the same server to Percona standalone MySQL v5.6 to v5.7, then once we are in Percona MySQL 5.7:

  3. I should do a mysqldump of that particular database “Keycloak”, and import the dump into our existing Percona XtraDB MySQL node 4 cluster.

Then I should disable the local Percona MySQL standalone 5.7 from the Keycloak server, and point it to the cluster like the rest of our PHP and Java applications point to.

We use Percona ProxySQL, then any client will connect to the ProxySQL and not direct connect to any of the 4 node.

Let me know if my assumptions need modifications.


1 Like

You can go from Percona MySQL 5.6 directly to PXC 5.7. No need for middle step.

#3, you only need to do this if you want to skip the upgrade steps. example: create a brand new 3-node PXC 5.7, then mysqldump 5.5, and import into 5.7 PXC. (4-node are dangerous, split-brain easily)

yes, then simply point app to new cluster.

1 Like