mysql ndbciuster 环境的搭建

测试环境 vmware server 1.09 
操作系统版本 RHEL AS 4.7
mysql版本: MySQL Cluster 7.0.6
 
cluster应用节点 10.83.201.221
cluster数据节点 10.83.201.223 10.83.201.222
cluster管理节点 10.83.201.224
 
一、 SQL node installation ― RPM files
MySQL-Cluster-gpl-server-7.0.6-0.rhel4.i386.rpm
To administer the SQL node
MySQL-Cluster-gpl-client-7.0.6-0.rhel4.i386.rpm
二、 Data node installation ― RPM Files
MySQL-Cluster-gpl-storage-7.0.6-0.rhel4.i386.rpm
ndbd in the /usr/sbin directory
三、 Management node installation ― RPM file
MySQL-Cluster-gpl-management-7.0.6-0.rhel4.i386.rpm
ndb_mgmd    to the /usr/sbin
You should also install the NDB management client
RPM installs the MySQL Cluster management client (ndb_mgm) to the /usr/bin directory
MySQL-Cluster-gpl-extra-7.0.6-0.rhel4.i386.rpm
You should also install the NDB management client, which is supplied by the Storage engine basic tools RPM
MySQL-Cluster-gpl-tools-7.0.6-0.rhel4.i386.rpm
四、 Configuring the Storage and SQL Nodes
shell>  vi   /etc/my.cnf
[mysqld]
ndbcluster
ndb-connectstring=10.83.201.224:1186
[mysql_cluster]
ndb-connectstring=10.83.201.224:1186
五、 Configuring the management node
shell> mkdir /var/lib/mysql-cluster
shell> cd /var/lib/mysql-cluster
shell> vi config.ini
[ndbd default]
NoOfReplicas=2
DataMemory=80M
IndexMemory=18M
[tcp default]
SendBufferMemory=2M
ReceiveBufferMemory=2M
[NDB_MGMD DEFAULT]
PortNumber=1186
Datadir=/var/lib/mysql-cluster
[ndb_mgmd]
id=1
hostname=10.83.201.224
datadir=/var/lib/mysql-cluster
[ndbd]
id=2
hostname=10.83.201.222
datadir=/var/lib/mysql-cluster
[ndbd]
id=3
hostname=10.83.201.223
datadir=/var/lib/mysql-cluster
[mysqld]
id=4
hostname=10.83.201.221
六、 Initial Startup of MySQL Cluster
The management node should be started first, followed by the data nodes, and then finally by any SQL nodes
On the management host
shell> /usr/sbin/ndb_mgmd -f /var/lib/mysql-cluster/config.ini --configdir=/var/lib/mysql-cluster/ --reload
On each of the data node hosts, run this command to start the ndbd process
shell> /usr/sbin/ndbd --initial
sqlnode 
you can (and should) use the supplied startup script to start the MySQL server process on the SQL node.
test this by invoking the ndb_mgm management node client.
shell> ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> SHOW
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=2    @10.83.201.222  (mysql-5.1.34 ndb-7.0.6, Nodegroup: 0, Master)
id=3    @10.83.201.223  (mysql-5.1.34 ndb-7.0.6, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=1    @10.83.201.224  (mysql-5.1.34 ndb-7.0.6)
[mysqld(API)]   1 node(s)
id=4    @10.83.201.221  (mysql-5.1.34 ndb-7.0.6)
七、 Safe Shutdown and Restart of MySQL Cluster
shell> ndb_mgm -e shutdown
[root@management mysql-cluster]# ndb_mgm -e shutdown
Connected to Management Server at: localhost:1186
2 NDB Cluster node(s) have shutdown.
Disconnecting to allow management server to shutdown. 
 
 

你可能感兴趣的:(mysql,数据库,职场,休闲)