MySQL Cluster Installation and Configuration Guide

1. Download Installation RPM files

Visit the MySQL Cluster Download Page : http://dev.mysql.com/downloads/cluster and download the required RPM files.
  1. MySQL-Cluster-client: MySQL-Cluster-client-gpl-7.2.10-1.rhel5.i386.rpm
  2. MySQL-Cluster-server: MySQL-Cluster-server-gpl-7.2.10-1.rhel5.i386.rpm

2. Installing RPM Files

Data Node
Install Server RPM
shell>> rpm -Uhv MySQL-Cluster-server-gpl-7.2.10-1.rhel5.i386.rpm

SQL Node 
Install both the Server and Client RPMs.

Management Node 
Install Server RPM.

3. Configuration MySQL

shell>> vi /etc/my.cnf
[mysqld]
# Options for mysqld process:
ndbcluster                      # run NDB storage engine

[mysql_cluster]
# Options for MySQL Cluster processes:
ndb-connectstring=192.168.0.10  # location of management server

On Management Node
shell> mkdir /var/lib/mysql-cluster
shell> cd /var/lib/mysql-cluster
shell> vi config.ini

Configuration
[ndbd default]
# Options affecting ndbd processes on all data nodes:
NoOfReplicas=2    # Number of replicas
DataMemory=80M    # How much memory to allocate for data storage
IndexMemory=18M   # How much memory to allocate for index storage
                  # For DataMemory and IndexMemory, we have used the
                  # default values. Since the "world" database takes up
                  # only about 500KB, this should be more than enough for
                  # this example Cluster setup.

[tcp default]

[ndb_mgmd]
# Management process options:
hostname=192.168.0.10           # Hostname or IP address of MGM node
datadir=/var/lib/mysql-cluster  # Directory for MGM node log files

[ndbd]
# Options for data node "A":
                                # (one [ndbd] section per data node)
hostname=192.168.0.30           # Hostname or IP address
datadir=/usr/local/mysql/data   # Directory for this data node's data files

[ndbd]
# Options for data node "B":
hostname=192.168.0.40           # Hostname or IP address
datadir=/usr/local/mysql/data   # Directory for this data node's data files

[mysqld]
# SQL node options:
hostname=192.168.0.20           # Hostname or IP address
                                # (additional mysqld connections can be
                                # specified for this node for various

Start Management node.
shell> ndb_mgmd -f /var/lib/mysql-cluster/config.ini

Start Data node.
shell> ndbd

Start SQL node
shell> service mysql start

Comments

Popular posts from this blog

How to Generate Contour Lines with QGIS – Step-by-Step Guide

How to configure truststore at springboot