MySQL Cluster Manager 1.2 – using the new features

Oracle have just announced that MySQL Cluster Manager 1.2 is Generally Available. For anyone not familiar with MySQL Cluster Manager – it’s a command-line management tool that makes it simpler and safer to manage your MySQL Cluster deployment – use it to create, configure, start, stop, upgrade…. your cluster.

So what has changed since MCM 1.1 was released?

The first thing is that a lot of work has happened under the covers and it’s now faster, more robust and can manage larger clusters. Feature-wise you get the following (note that a couple of these were released early as part of post-GA versions of MCM 1.1):

Automation of on-line backup and restore

Single command to start MCM and a single-host Cluster

Multiple clusters per site

Single command to stop all of the MCM agents in a Cluster

Provide more details in “show status” command

Ability to restart “initial” the data nodes in order to wipe out the database ahead of a restore

Simplified on-line backup & restore

The database can be backed up with a single command (which in turn makes every data node in the cluster backup their data):

1

mcm>backup cluster mycluster;

The list command can be used to identify what backups are available in the cluster:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

mcm>list backups mycluster;

+----------+--------+--------+----------------------+

|BackupId|NodeId|Host|Timestamp|

+----------+--------+--------+----------------------+

|1|1|green|2012-11-31T06:41:36Z|

|1|2|brown|2012-11-31T06:41:36Z|

|1|3|green|2012-11-31T06:41:36Z|

|1|4|brown|2012-11-31T06:41:36Z|

|1|5|purple|2012-11-31T06:41:36Z|

|1|6|red|2012-11-31T06:41:36Z|

|1|7|purple|2012-11-31T06:41:36Z|

|1|8|red|2012-11-31T06:41:36Z|

+----------+--------+--------+----------------------+

You may then select which of these backups you want to restore by specifying the associated BackupId when invoking the restore command:

1

mcm>restore cluster-I1mycluster;

Note that if you need to empty the database of its existing contents before performing the restore then MCM 1.2 introduces the initial option to the start cluster command which will delete all data from all MySQL Cluster tables.