Thursday, 17 April 2014

Quick Installation of MySQL Cluster NDB 7.3 - PART 1

Recently I've been taking part in a MySQL event in Rome and while the new version of MySQL Cluster was being explained by the technician, I got an idea !

Why not use this product in our new production environment ? Infact I'm still working on it and this Cluster NDB could be a wonderful solution for it.

So I decided to download the community edition of MySQL Cluster NDB 7.3 for linux and afterwards I got down the installation process.

Following you'll find all the steps to install quickly a Cluster made up of :

  • Two Management nodes (Mysqlvm02ClusterMgm & Mysqlvm03ClusterMg),
  • Two SQL nodes (Mysqlvm04ClusterData1 & Mysqlvm05ClusterData2),
  • Two Data nodes (Mysqlvm04ClusterData1 & Mysqlvm05ClusterData2).

Be careful ! The SQL nodes and Data nodes are in the same servers (Mysqlvm04ClusterData1 & Mysqlvm05ClusterData2) only because I haven't got enough memory and disk space on my Virtual machine server used for testing purpose. In your environment fell free to create as many nodes as you prefer.

STEP 1 : On every cluster node execute the following command as root :  

mkdir -p /home/mysql/mysqlCluster/
mkdir -p /home/mysql/mysqlClusterData/
mkdir -p /home/mysql/download


groupadd -g 3000 mysql
useradd -u 3000 -g 3000 -d /home/mysql -s /bin/bash -c "MySQL DBA" mysql
passwd mysql
chown -R mysql:mysql /home/mysql

cp mysql-cluster-advanced-7.3.4-linux-glibc2.5-x86_64.tar  /usr/local
tar xvf mysql-cluster-advanced-7.3.4-linux-glibc2.5-x86_64.tar
ln -s /usr/local/mysql-cluster-advanced-7.3.4-linux-glibc2.5-x86_64 /usr/local/mysql
chown -R mysql:mysql mysql
cd mysql
chown -R mysql:mysql *

According to the MySQL manual the installation of data nodes and management nodes don't require the mysqld binary, instead I prefered to install it the same, in order to be able to change the role of them later on.

STEP 2 : On every SQL Node execute the following command as root:

[root@MysqlVm04ClusterData1 mysql]# cd /usr/local/mysql
[root@MysqlVm04ClusterData1 mysql]# scripts/mysql_install_db --user=mysql

To be continued....

See you in my next blog.

Byeeeee

No comments:

Post a Comment