John.M
John.M

Reputation: 363

Where to find MySQL InnoDB Cluster Names

Where can I find the cluster names that have been created in an InnoDB cluster when the cluster isn't running?

Upvotes: 1

Views: 3120

Answers (1)

Miguel Araújo
Miguel Araújo

Reputation: 243

The cluster name is registered in the Metadata schema. A simple SQL query can be used to obtain it:

SELECT cluster_name from mysql_innodb_cluster_metadata.clusters;

However, if you need to reboot your cluster from complete outage, you don't need its name.

The command dba.rebootClusterFromCompleteOutage() can be used without the clusterName parameter. If you see its documentation you'll notice that the cluster_name parameter is optional. This is because multiple Clusters cannot belong to the same Metadata schema.

So to recover your cluster, connect to one of its previous members and run:

mysql-js> var cluster = dba.rebootClusterFromCompleteOutage()

More information at: https://dev.mysql.com/doc/refman/8.0/en/mysql-innodb-cluster-working-with-cluster.html#reboot-outage

Cheers, Miguel

Upvotes: 1

Related Questions