Testing your shiny New MySQL Pi-Cluster

So you’ve done all the hard work, now what?

We need to test that everything is working. Ie:

  • That the Management Daemon can see the NDB instances.
  • That the NDB instances are running on the two cluster nodes
  • The MySQL client can connect and talk to the NDB presented tables

start the MySQL client

and execute the following command to show available NDB nodes:


show global status like 'ndb_number_of%';


mysql -uroot -p[password you set when first running mysql]

root@cgepi1:/var/lib/mysql-cluster# mysql -uroot -phelpdesk
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.25a-ndb-7.3.0-log Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show global status like 'ndb_number_of%'; 
| Variable_name | Value |
| Ndb_number_of_data_nodes | 2 |
| Ndb_number_of_ready_data_nodes | 2 |
2 rows in set (0.01 sec)


The above illustrates that NDB should be available on 2 nodes and both those nodes are available to MySQL.


You can then verify this by using the management command line utility

root@cgepi1:/var/lib/mysql-cluster# ndb_mgm -e show
Connected to Management Server at:
Cluster Configuration
[ndbd(NDB)] 2 node(s)
id=3 @ (mysql-5.5.25 ndb-7.3.0, Nodegroup: 0, Master)
id=4 @ (mysql-5.5.25 ndb-7.3.0, starting, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @ (mysql-5.5.25 ndb-7.3.0)
[mysqld(API)] 5 node(s)
id=50 @ (mysql-5.5.25 ndb-7.3.0)
id=51 (not connected, accepting connect from any host)
id=52 (not connected, accepting connect from any host)
id=53 (not connected, accepting connect from any host)
id=54 (not connected, accepting connect from any host)

Congratulations!! This now means everything is working 🙂 Not bad for £50 worth of hardware!





Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s