Documentation Home
MySQL Shell for VS Code

MySQL Shell for VS Code  /  ...  /  InnoDB ClusterSet Methods

Pre-General Availability: 2024-06-24

5.6.3 InnoDB ClusterSet Methods

The ClusterSet object is the entry point to manage and monitor a MySQL InnoDB ClusterSet.

ClusterSets allow InnoDB Cluster deployments to achieve fault-tolerance for a whole Data Center or geographic location, by creating replica clusters in other locations or Data Centers, ensuring Disaster Recovery is possible.

The following table provides a list of the available InnoDB ClusterSet Python methods.

InnoDB ClusterSet Method Description
create_replica_cluster() Creates a new InnoDB Cluster that is a replica of the primary Cluster.
describe() Describe the structure of the InnoDB ClusterSet.
disconnect() Disconnects all internal sessions used by the InnoDB ClusterSet object.
force_primary_cluster() Performs a failover of the primary InnoDB Cluster of the ClusterSet.
get_name() Returns the domain name of the InnoDB ClusterSet.
help([member]) Provides help about this class and its specified member.
list_routers() Lists the MySQL Router instances of the InnoDB ClusterSet, or a single MySQL Router instance.
options() Lists the InnoDB ClusterSet configuration options.
rejoin_cluster() Rejoin an invalidated InnoDB Cluster back to the InnoDB ClusterSet and update replication.
remove_cluster() Removes a replica InnoDB Cluster from an InnoDB ClusterSet.
routing_options() Lists the InnoDB ClusterSet Routers configuration options.
set_option() Changes the value of an option for the whole InnoDB ClusterSet.
set_primary_cluster() Performs a safe switchover of the primary InnoDB Cluster of the ClusterSet.
set_routing_option() Changes the value of either a global MySQL Routing option or of a single MySQL Router instance.
status() Describe the status of the InnoDB ClusterSet.

You can find more help about a specific method by using the command. For example, to see the help details for the create_replica_cluster method for the InnoDB ClusterSet assigned to the cs variable, type: