MySQL Cluster Tutorial - cdn.oreillystatic.com
MySQL Cluster Tutorial - cdn.oreillystatic.com
MySQL Cluster Tutorial - cdn.oreillystatic.com
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
2. Ensure that the version of <strong>MySQL</strong> <strong>Cluster</strong> Manager you are using supports both the<br />
original and new versions of <strong>MySQL</strong> <strong>Cluster</strong>; if not then you must first upgrade to an<br />
appropriate version of <strong>MySQL</strong> <strong>Cluster</strong> Manager as described in section 1.3.7.<br />
3. Ensure that the install tar ball for the new version of <strong>MySQL</strong> <strong>Cluster</strong> has been copied to<br />
each host and the associated packages defined.<br />
The upgrade itself is performed using a single <strong>com</strong>mand which will upgrade each node in<br />
sequence such that database service is not interrupted to connected applications and<br />
clients:<br />
mcm> upgrade cluster --package=7.0.9 mycluster;<br />
+-------------------------------+<br />
| Command result |<br />
+-------------------------------+<br />
| <strong>Cluster</strong> upgraded successfully |<br />
+-------------------------------+<br />
1 row in set (1 min 41.54 sec)<br />
Upgrading <strong>MySQL</strong> <strong>Cluster</strong> Manager<br />
Upgrading <strong>MySQL</strong> <strong>Cluster</strong> Manager is very straightforward. Simply stop the agents on<br />
each host and then start up the new version of the agents. The same<br />
mysql-cluster-manager.ini file should be used for the new version; in particular the<br />
manager-directory attribute should be the same as used with the previous version, so that<br />
the configuration information is not lost.<br />
<strong>MySQL</strong> <strong>Cluster</strong> continues to run when the <strong>MySQL</strong> <strong>Cluster</strong> Manager agents are stopped,<br />
and so there is no service impact during the upgrade. If a <strong>MySQL</strong> <strong>Cluster</strong> node fails during<br />
the upgrade, the database continues to function but the node is not recovered until the new<br />
agents have started – for this reason, the administrator may choose to perform the<br />
upgrade when demands on the database are at their lowest.<br />
Shutting down the <strong>Cluster</strong><br />
An entire <strong>Cluster</strong> can be shutdown using a single <strong>com</strong>mand:<br />
mcm> stop cluster mycluster;<br />
+------------------------------+<br />
| Command result |<br />
+------------------------------+<br />
| <strong>Cluster</strong> stopped successfully |<br />
+------------------------------+<br />
1 row in set (22.96 sec)<br />
Unlike the shutdown <strong>com</strong>mand from ndb_mgm that would be used if not using <strong>MySQL</strong><br />
<strong>Cluster</strong> Manager, stop cluster will also safely stop all <strong>MySQL</strong> Server processes.<br />
HA Provided by <strong>MySQL</strong> <strong>Cluster</strong> Manager<br />
If <strong>MySQL</strong> <strong>Cluster</strong> detects that a <strong>MySQL</strong> <strong>Cluster</strong> process has failed, then it will<br />
automatically restart it (for data nodes this only happens if StopOnError attribute the has<br />
been set to FALSE). For data nodes, the agents take over this role from the existing <strong>MySQL</strong><br />
<strong>Cluster</strong> data node angel processes, but for Management and <strong>MySQL</strong> Server nodes this is<br />
new functionality.<br />
It is the responsibility of the administrator or application to restart the <strong>MySQL</strong> <strong>Cluster</strong><br />
Manager agents in the event that they fail; for example by creating a script in<br />
/etc/init.d<br />
Copyright © 2010, Oracle and/or its affiliates. All rights reserved. 32/81