MySQL Cluster Manager 1.1.2 – creating a Cluster is now trivial

MySQL Cluster Manager 1.1.2 is now available to download and try from Oracle E-Delivery (select “MySQL Database” as the product pack). Something that’s new and really cool in the new version is that you can download a version of MCM that actually includes the MySQL Cluster software itself and then you can have MCM automatically define, create and start a single-host cluster deployment for you with just the command “mcmd –bootstrap”. This post aims to show that it’s really as simple as that!

I’ve been playing with Windows recently and so I’ll use that for this example but things would be very similar on other platforms.

Step 1 Download from E-Delivery and extract the zip file

Step2 Start your first cluster!

PS D:AndrewDocumentsMySQLmcm> binmcmd --bootstrap
MySQL Cluster Manager 1.1.2 started
Connect to MySQL Cluster Manager by running "D:AndrewDocumentsMySQLmcmbinmcm" -a NOVA:1862
Configuring default cluster 'mycluster'...
Starting default cluster 'mycluster'...
Cluster 'mycluster' started successfully
 ndb_mgmd NOVA:1186
 ndbd NOVA
 ndbd NOVA
 mysqld NOVA:3306
 mysqld NOVA:3307
 ndbapi *
Connect to the database by running "D:AndrewDocumentsMySQLmcmclusterbinmysql" -h NOVA -P 3306 -u root

That’s it!

Just to prove it you can now go ahead and start using the database (note that I connect with the command suggested by MCM but in this case I had to shift the quotes…

PS C:UsersAndrew> D:"AndrewDocumentsMySQLmcmclusterbinmysql" -h NOVA -P 3306 
mysql> CREATE DATABASE clusterdb;
mysql> USE clusterdb;
mysql> CREATE TABLE towns (name VARCHAR(30) NOT NULL PRIMARY KEY) ENGINE=NDBCLUSTER;
mysql> REPLACE INTO towns VALUES ('Maidenhead'), ('Marlow');
mysql> SELECT * FROM towns;
+------------+
| name       |
+------------+
| Maidenhead |
| Marlow     |
+------------+

So how much simpler is this than doing it by hand? 

With MCM bootstrap:

  • Packages to download & install: 1
  • Config files to create/edit: 0
  • Commands to run: 1
Without MCM:
  • Packages to download & install: 1 if using tar-ball, up to 13 if using RPMs
  • Config files to create/edit: 3
  • Commands to run: 12




2 comments

  1. […] which is also GA in version 1.1.4, which fully supports the MySQL 7.2 GA.  Check out their Cluster Manager and their blog article on Synchronously Replicating Databases Across Data […]

  2. Pedro says:

    How can I solve this problem?

    MySQL Cluster Manager 1.2.4 (64bit) started
    Connect to MySQL Cluster Manager by running “/opt/mcm-1.2.4/bin/mcm” -a desenv-linux2:1862
    Configuring default cluster ‘mycluster’…
    ERROR: Unable to create site, aborting bootstrap!
    ERROR 2004: (00MGR) Host desenv-linux2 is not a member of site mysite

    file log:

    Starting xcom thread on port 18620
    2013-12-13 12:19:47.184: (message) MySQL Cluster Manager 1.2.4 (64bit) started
    2013-12-13 12:19:47.184: (message) [T0x1ed5280 CMGR ]: Starting recovery
    2013-12-13 12:19:47.184: (message) [T0x1ed5280 CMGR ]: Cluster Manager thread started
    2013-12-13 12:19:47.186: (message) [T0x1ebf010 chass]: Listening for client connections on desenv-linux2:1862
    2013-12-13 12:19:47.186: (message) [T0x7fe4700021c0 BOOT ]: Starting bootstrap thread
    2013-12-13 12:19:47.245: (message) [T0x1ed5240 XCOM ]: Recovery completed
    2013-12-13 12:19:47.307: (message) [T0x1ebf010 chass]: Received command : create site –hosts=desenv-linux2 mysite
    2013-12-13 12:19:47.313: (message) [T0x1ebf010 chass]: Handling request id 1
    2013-12-13 12:19:47.313: (critical) network-mysqld.c:2043: left the MySQL protocol’s state-machine at state ‘CON_STATE_READ_QUERY’. You may see the connection hang now.

Leave a Reply