用于 VS 代码的 MySQL Shell GUI / MySQL Shell  / 第 5 章 MySQL Shell 控制台  / 5.6 管理接口  / 
5.6.3 InnoDB ClusterSet 方法	
            
全面上市前:2022-11-17
        该ClusterSet对象是管理和监控 MySQL InnoDB ClusterSet 的入口点。
      
        ClusterSets通过在其他位置或数据中心创建集群,允许 InnoDB 集群部署实现整个数据中心或地理位置的容错replica,确保灾难恢复成为可能。
      
下表提供了可用的 InnoDB ClusterSet Python 方法的列表。
| InnoDB ClusterSet方法 | 描述 | 
|---|---|
create_replica_cluster() | 
            创建一个新的 InnoDB Cluster,它是主 Cluster 的副本。 | 
describe() | 
            描述 InnoDB ClusterSet 的结构。 | 
disconnect() | 
            断开 InnoDB ClusterSet 对象使用的所有内部会话。 | 
force_primary_cluster() | 
            执行 ClusterSet 的主 InnoDB Cluster 的故障转移。 | 
get_name() | 
            返回 InnoDB ClusterSet 的域名。 | 
help([member]) | 
            提供有关此类及其指定成员的帮助。 | 
list_routers() | 
            列出 InnoDB ClusterSet 的 MySQL Router 实例,或单个 MySQL Router 实例。 | 
options() | 
            列出 InnoDB ClusterSet 配置选项。 | 
rejoin_cluster() | 
            将无效的 InnoDB Cluster 重新加入到 InnoDB ClusterSet 并更新复制。 | 
remove_cluster() | 
            从 InnoDB ClusterSet 中删除副本 InnoDB Cluster。 | 
routing_options() | 
            列出 InnoDB ClusterSet 路由器配置选项。 | 
set_option() | 
            更改整个 InnoDB ClusterSet 的选项值。 | 
set_primary_cluster() | 
            执行 ClusterSet 的主 InnoDB Cluster 的安全切换。 | 
set_routing_option() | 
            更改全局 MySQL 路由选项或单个 MySQL 路由器实例的值。 | 
status() | 
            描述 InnoDB ClusterSet 的状态。 | 
        您可以使用命令找到有关特定方法的更多帮助
        ClusterSet.help。例如,要查看create_replica_cluster分配给cs
        变量的 InnoDB ClusterSet 方法的帮助详细信息,请键入:
      
Python
cs.help("create_replica_cluster")
JavaScript
cs.help("createReplicaCluster")