mysql cluster集群的问题,郁闷,麻烦高手帮忙看看
管理服务器(192.168.0.61)配置文件
config.ini
//////////////////////////////
[NDBD DEFAULT]
NoOfReplicas=2
DataMemory=600M
IndexMemory=100M
[MYSQLD DEFAULT]
[NDB_MGMD DEFAULT]
[TCP DEFAULT]
[NDB_MGMD]
HostName= 192.168.0.61
DataDir= /var/lib/mysql-cluster
[NDBD]
HostName= 192.168.0.17
DataDir= /usr/local/mysql/data
[NDBD]
HostName= 192.168.0.191
DataDir= /usr/local/mysql/data
[MYSQLD]
HostName= 192.168.0.36
[MYSQLD]
HostName= 192.168.0.192
[MYSQLD]
[MYSQLD]
//////////////////////////////
数据节点(192.168.0.17 192.168.0.191)/sql节点(192.168.0.192)配置文件
/etc/my.cnf
////////////////////////////////
[MYSQLD]
ndbcluster # run NDB engine
ndb-connectstring=192.168.0.61 # location of MGM node
# Options for ndbd process:
[MYSQL_CLUSTER]
ndb-connectstring=192.168.0.61
////////////////////////////////
现在出现个怪问题,如果正常启动,show的内容为
///////////////////////////////////////
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @192.168.0.17 (Version: 5.1.5, Nodegroup: 0)
id=3 @192.168.0.191 (Version: 5.1.5, Nodegroup: 0, Master)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.0.61 (Version: 5.1.5)
[mysqld(API)] 4 node(s)
id=4 (not connected, accepting connect from 192.168.0.36)
id=5 @192.168.0.192 (Version: 5.1.5)
id=6 @192.168.0.17 (Version: 5.1.5)
id=7 @192.168.0.191 (Version: 5.1.5)
///////////////////////////////////////
注:其中我为了测试,把17跟191都启动了mysql进程
如果我关了17的ndbd(杀了进程或者拔掉网线),在管理主机里面show看到的是
////////////////////////////////////////
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 (not connected, accepting connect from 192.168.0.17)
id=3 @192.168.0.191 (Version: 5.1.5, Nodegroup: 0, Master)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.0.61 (Version: 5.1.5)
[mysqld(API)] 4 node(s)
id=4 (not connected, accepting connect from 192.168.0.36)
id=5 (not connected, accepting connect from 192.168.0.192)
id=6 (not connected, accepting connect from any host)
id=7 @192.168.0.191 (Version: 5.1.5)
////////////////////////////////////////
也就是其中mysql的节点17跟192都连接不上了
但如果我关了191的ndbd(杀了进程或者拔掉网线),在管理主机里面show看到的是
////////////////////////////////////////
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @192.168.0.17 (Version: 5.1.5, Nodegroup: 0, Master)
id=3 (not connected, accepting connect from 192.168.0.191)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.0.61 (Version: 5.1.5)
[mysqld(API)] 4 node(s)
id=4 (not connected, accepting connect from 192.168.0.36)
id=5 @192.168.0.192 (Version: 5.1.5)
id=6 @192.168.0.17 (Version: 5.1.5)
id=7 @192.168.0.191 (Version: 5.1.5)
////////////////////////////////////////
可以看到,里面的mysql节点是完全正常连接的
请问大家有没有见过这样的情况?到底怎么回事?
最近评论