MySQL Cluster Tutorial - cdn.oreillystatic.com
MySQL Cluster Tutorial - cdn.oreillystatic.com
MySQL Cluster Tutorial - cdn.oreillystatic.com
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
It is worth noting that whilst all the data nodes are in this phase and the cluster is not<br />
officially started API nodes will not be allowed to connect, even if they are started, so these<br />
will show 'not connected'.<br />
STATUS<br />
This <strong>com</strong>mand gives a more detailed status report for an individual node, as such it<br />
requires a node ID (or the 'ALL' keyword).<br />
For example, during a cluster start:<br />
ndb_mgm> 2 status<br />
Node 2: starting (Last <strong>com</strong>pleted phase 3) (mysql-5.1.41 ndb-7.1.2)<br />
With the 'ALL' keyword on a started cluster:<br />
ndb_mgm> all status<br />
Node 2: started (mysql-5.1.41 ndb-7.1.2)<br />
Node 3: started (mysql-5.1.41 ndb-7.1.2)<br />
Note that the 'ALL' keyword only means all data nodes, not all nodes. This <strong>com</strong>mand can,<br />
however, be used with any node type.<br />
For example, lets ask for the management node's status:<br />
ndb_mgm> 1 status<br />
Node 1: connected (Version 7.1.2)<br />
STOP<br />
The STOP <strong>com</strong>mand is used to shutdown an individual data or management node cleanly or<br />
stop all the data nodes. For example:<br />
ndb_mgm> 2 stop<br />
Node 2: Node shutdown initiated<br />
Node 2: Node shutdown <strong>com</strong>pleted.<br />
Node 2 has shutdown.<br />
This <strong>com</strong>mand will not let you do an action which will terminate other nodes too<br />
(unless 'ALL' is used). So with node 2 down:<br />
ndb_mgm> 3 stop<br />
Node 3: Node shutdown aborted<br />
Shutdown failed.<br />
* 2002: Stop failed<br />
* Node shutdown would cause system crash: Permanent error: Application error<br />
So with 'ALL STOP' with all data nodes running again:<br />
ndb_mgm> all stop<br />
Executing STOP on all nodes.<br />
Node 2: <strong>Cluster</strong> shutdown initiated<br />
Node 3: <strong>Cluster</strong> shutdown initiated<br />
Node 2: Node shutdown <strong>com</strong>pleted.<br />
Node 3: Node shutdown <strong>com</strong>pleted.<br />
NDB <strong>Cluster</strong> has shutdown.<br />
RESTART<br />
The RESTART <strong>com</strong>mand is very much like STOP but it starts the node again. This <strong>com</strong>mand<br />
does not always work as expected, so in general we re<strong>com</strong>mend using with caution. When<br />
it does work you should expect output similar to this:<br />
Copyright © 2010, Oracle and/or its affiliates. All rights reserved. 18/81