MySQL ClusterSet : rename ClusterSet

by Mark Nielsen
Copyright May 2023



MySQL ClusterSet : rename ClusterSet

TODO: this document needs to be tested. The general steps are true. I need to add examples and test all the steps manually. I am going from memory.



Technically true

It is technically true you cannot rename a ClusterSet. However, with downtime it is possible, little downtime is preferable.

Assumptions



Make sure p1 is the primary host in the primary cluster

Refer to https://www.percona.com/blog/mysql-group-replication-how-to-elect-the-new-primary-node/

Basically



Make sure all applications are pointing to p1.

Make sure all applications are pointing to p1 and not any router. This may required minimal downtime are you may have to restart the applications.

Failover to replica, some downtime.

Destroy the clusters and clusterSets. Make sure all applications are pointing to p1 and not any router. PLEASE test these steps yourself on test machines and document the steps before doing it in production!



Remove primary Cluster and replica hosts r2 and r3, some downtime.



Shutdown r1 and remove ClusterSet settings.



Remake ClusterSet, no downtime.



Failover to "primary" cluster, little downtime



Setup router and point applications to router.

It is beyond the scope of this article to deal with a router. You want to install a router and have the applications point to it. You want to "bootstrap" a router.