4.4.8stop cluster命令

stop cluster cluster_name

此命令停止名为 的集群 cluster_name(如果它正在运行),如本例所示:

mcm> stop cluster mycluster;
+------------------------------+
| Command result               |
+------------------------------+
| Cluster stopped successfully |
+------------------------------+
1 row in set (21.31 sec)

stop cluster如果集群未处于运行状态,则失败(有关获取集群状态的信息, 请参见第 4.4.6 节“show status命令” ):

mcm> show status --cluster mycluster;
+-----------+---------+---------+
| Cluster   | Status  | Comment |
+-----------+---------+---------+
| mycluster | stopped |         |
+-----------+---------+---------+
1 row in set (0.01 sec)

mcm> stop cluster mycluster;
ERROR 5006 (00MGR): Cluster mycluster is stopped

stop cluster在导入完成之前,不能在为导入创建的集群上使用。有关详细信息,请参阅 第 4.4.1 节“create cluster命令”第 3.5 节“将 MySQL 集群导入 MySQL 集群管理器”