Install and configure bitsCN.com in mysqlcluster
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"
BitsCN.com