[root@db2 bin]# ./ndb_mgmd --configdir=/var/lib/mysql-cluster/ -f /var/lib/mysql-cluster/config.ini --initial --启动管理节点服务
MySQL Cluster Management Server mysql-5.6.17 ndb-7.3.6
[root@db2 bin]# netstat -anp | grep ndb
tcp 0 0 0.0.0.0:1186 0.0.0.0:* LISTEN 3569/ndb_mgmd
tcp 0 0 192.168.1.105:1186 192.168.1.102:45799 ESTABLISHED 3569/ndb_mgmd
tcp 0 0 192.168.1.105:1186 192.168.1.104:46933 ESTABLISHED 3569/ndb_mgmd
tcp 0 0 127.0.0.1:1186 127.0.0.1:55347 ESTABLISHED 3569/ndb_mgmd
tcp 0 0 192.168.1.105:1186 192.168.1.102:45800 ESTABLISHED 3569/ndb_mgmd
tcp 0 0 192.168.1.105:1186 192.168.1.102:45801 ESTABLISHED 3569/ndb_mgmd
tcp 0 0 127.0.0.1:55347 127.0.0.1:1186 ESTABLISHED 3569/ndb_mgmd
unix 3 [ ] STREAM CONNECTED 20977 3569/ndb_mgmd
unix 3 [ ] STREAM CONNECTED 20976 3569/ndb_mgmd
[root@db2 bin]#
4.启动cluster节点和数据库服务
cluster node1:
[root@node1 bin]# ./ndbd --initial
2014-10-10 09:59:20 [ndbd] INFO -- Angel connected to '192.168.1.19:1186'
2014-10-10 09:59:20 [ndbd] INFO -- Angel allocated nodeid: 2
[root@node1 bin]# ../support-files/mysql.server start
Starting MySQL SUCCESS!
[root@node1 bin]#
cluster node2:
[root@node2 bin]# ./ndbd --initial
2014-10-10 10:01:24 [ndbd] INFO -- Angel connected to '192.168.1.19:1186'
2014-10-10 10:01:24 [ndbd] INFO -- Angel allocated nodeid: 3
[root@node2 bin]# ../support-files/mysql.server start
Starting MySQL SUCCESS!
[root@node2 bin]#
管理节点查看信息:
[root@db2 bin]# ./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 @192.168.1.102 (mysql-5.6.17 ndb-7.3.6, Nodegroup: 0, *)
id=3 @192.168.1.104 (mysql-5.6.17 ndb-7.3.6, Nodegroup: 1)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.1.19 (mysql-5.6.17 ndb-7.3.6)
[mysqld(API)] 2 node(s)
id=4 @192.168.1.102 (mysql-5.6.17 ndb-7.3.6)
id=5 @192.168.1.102 (mysql-5.6.17 ndb-7.3.6)
ndb_mgm>