help centre
For more info visit

How can we help?

Search our knowledge base for answers to
common questions and latest updates.

My activities New request


MySQL NDB for Atmail

Nathan Salt -


Using NDB Cluster storage


  • On-Premise Server + WebMail Installations: Version 6.0 > Current Version
  • Webmail Only Installations: Version 6.0 > Current Version


Using NDB Cluster storage


This portion of the guide covers the steps necessary to use the MySQL NDB Cluster with two storage engines and one management server. This will allow the two MySQL servers to share data independently, and still have the same information for both. In the case of one server going down, the other server will still be active. Changes made to the other server during this period will be "healed" by the MySQL NDB management system.

Packages for MySQL NDB exist for a lot of systems. However, this guide will cover the process of installing it from source - along with PHP.

For this guide, we will have three servers - server1.local (, server2.local (, andserver3.local ( The first two servers will be the replicated storage engines. The third server will act as an NDB management machine.

Setting up the Storage Machines

This step applies to server1.local and server2.local. First, download the MySQL Cluster package from: Then, untar to your preferred base directory. For this example, we will use /usr/local/:

% tar xvfz mysql-cluster-gpl-7.1.3-linux-i686-glibc23.tar.gz -C /usr/local/

Create a symlink for ease, or rename the folder:

% ln -s /usr/local/mysql-cluster-gpl-7.1.3-linux-i686-glibc23 /usr/local/mysql

Then, install MySQL:

% cd /usr/local/mysql
% adduser mysql
% groupadd mysql
% scripts/mysql_install_db --user=mysql
% chown -R root  .
% chown -R mysql data
% chgrp -R mysql .
% cp support-files/mysql.server /etc/rc.d/init.d/
% chmod +x /etc/rc.d/init.d/mysql.server
% chkconfig --add mysql.server

Then, create a file called /etc/my.cnf. In the file, add:


Replace "" with your management server's (server3.local) IP. Then, create the required directories:

% mkdir /var/lib/mysql-cluster

Setting up the Management Server

The MySQL Cluster package will contain the following files:


Transfer these files to the server3.local server, as:


Then, assign permissions:

% chmod +x /usr/bin/ndb_mgm
% chmod +x /usr/bin/ndb_mgmd

Then, create the required directories:

% mkdir /var/lib/mysql-cluster

In the directory, setup the configuration file called "/var/lib/mysql-cluster/config.ini". In the file:

# NDB MGM Server
# MySQL servers
DataDir= /var/lib/mysql-cluster

Change the IP addresses accordingly, depending on your setup. Now, start the NDB management process:

% /usr/bin/ndb_mgmd

Starting the NDB processes

On the two MySQL servers, execute:

/usr/local/mysql/bin/ndbd --initial
/etc/rc.d/init.d/mysql.server start

You can check if the MySQL NDB is active by typing this in the third server (server3.local):

% ndb_mgm

This will show a terminal. Type:

ndb_mgm> show

It will show something similar to:

Cluster Configuration
[ndbd(NDB)]    2 node(s)
id=2    @  (mysql-5.1.44 ndb-7.1.3, Nodegroup: 0, Master)
id=3    @  (mysql-5.1.44 ndb-7.1.3, starting, Nodegroup: 0)
[ndb_mgmd(MGM)]    1 node(s)
id=1    @  (mysql-5.1.44 ndb-7.1.3)
[mysqld(API)]    2 node(s)
id=4    @  (mysql-5.1.44 ndb-7.1.3)
id=5    @  (mysql-5.1.44 ndb-7.1.3)

Congratuations! You have MySQL NDB active.

Have more questions? Submit a request


Contact our support team

+61 (7) 5357 6605