Install and configure mysql cluster on centos6.0
I am using the rpm package of mysql cluster 7.1.15a.
I used five VMS:
One Management node, two SQL nodes, and two data nodes
The installation and configuration steps are as follows:
1. Management node Installation
Rpm-vih/home/aa/MySQL-Cluster-gpl-management-7.1.15a-1.rhel5.i386.rpm
Rpm-vih/home/aa/MySQL-Cluster-gpl-tools-7.1.15a-1.rhel5.i386.rpm
Rpm-vih/home/aa/MySQL-Cluster-gpl-extra-7.1.15a-1.rhel5.i386.rpm
2. Install both SQL nodes (both must be installed)
Rpm-vih/home/aa/MySQL-Cluster-gpl-server-7.1.15a-1.rhel5.i386.rpm
Rpm-vih/home/aa/MySQL-Cluster-gpl-client-7.1.15a-1.rhel5.i386.rpm
3. install two data nodes
Rpm-vih/home/aa/MySQL-Cluster-gpl-storage-7.1.15a-1.rhel5.i386.rpm
4. Manage node configuration
Mkdir/var/lib/mysql-cluster
Cd/var/lib/mysql-cluster
Vim/var/lib/mysql-cluster/config. ini
[Ndbd default]
NoOfReplicas = 2
DataMemory = 80 M
IndexMemory = 18 M
[Tcp default]
[Ndb_mgmd]
Hostname = 192.168.1.103 # management Node Address
Datadir =/var/lib/mysql-cluster
[Ndbd]
Hostname = 192.168.1.100 # data node ip Address
Datadir =/var/lib/mysql-cluster/data # The data directory is manually created on the data node.
[Ndbd]
Hostname = 192.168.1.61 # ip address of the second data node
Datadir =/var/lib/mysql-cluster/data
[Mysqld]
Hostname = 192.168.1.101 # SQL node ip Address
[Mysqld]
Hostname = 192.168.1.104 # ip address of the second SQL Node
5. data node configuration (both nodes are configured)
Vim/etc/my. cnf
[Mysqld]
Ndbcluster
Ndb-connectstring = 192.168.1.103 # manage node ip
[Mysql_cluster]
Ndb-connectstring = 192.168.1.103 # manage node ip
6. SQL node configuration (both nodes are configured)
Vim/etc/my. cnf
[Mysqld]
Ndbcluster
Ndb-connectstring = 192.168.1.103 # manage node ip
Port = 3306
[Mysql_cluster]
Ndb-connectstring = 192.168.1.103 # manage node ip
7. Start mysql cluster
Start the management node, start the data node, and then start the SQL node.
Start the management node:
Ndb_mgmd-f/var/lib/mysql-cluster/config. ini
Start the data node:
Ndbd
Start an SQL node:
/Usr/bin/mysqld_safe -- user = mysql &
8. Complete the configuration and check the configuration.
Run the following command on the Management node:
Supplement: simple personal configuration. If there are any deficiencies, please forgive me.
Author: "I am the master of my youth"