mysql 集群问题在网上查找了好久没有解决
三台电脑 做集群 192.168.0.100为管理节点,192.168.0.120和192.168.0.130做集群节点和mysql节点my.conf的文件内容为
default-storage-engine=ndbcluster
#datadir=/var/lib/mysql
#socket=/var/lib/mysql/mysql.sock
#user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
#old_passwords=1
#
#log-error=/var/log/mysqld.log
#pid-file=/var/run/mysqld/mysqld.pid
ndbcluster
ndb-connectstring=192.168.0.100
connect-string=192.168.0.130,192.168.0.120
connect-string=192.168.0.130,192.168.0.120
config-file=/etc/config.ini
ndb-connectstring=192.168.0.100
集群节点config.ini的内容为
PortNumber=2202
NoOfReplicas=2
Id=1
hostname=192.168.0.100
datadir=/var/lib/mysql-cluster
Id=2
HostName=192.168.0.120
datadai=/usr/local/mysql/data
Id=3
HostName=192.168.0.130
datadir=/usr/local/mysql/data
奇怪的是我在别的地方用虚拟机可以成功,今天在单位又做实验
192.168.0.100
# /usr/local/mysql/bin/ndb_mgmd -f /etc/config.ini
2010-05-13 15:05:20 INFO -- NDB Cluster Management Server. mysql-5.1.44 ndb-7.1.3
2010-05-13 15:05:20 INFO -- Loaded config from '/usr/local/mysql/mysql-cluster/ndb_1_config.bin.1'
可以启动
在192.168.0.120上
/usr/local/mysql/bin/ndbd --initial
可以启动没有问题
但是在192.168.0.130上
/usr/local/mysql/bin/ndbd --initial
2010-05-13 15:08:50 INFO -- Unable to alloc node id
2010-05-13 15:08:50 INFO -- Error : Could not alloc node id at 192.168.0.100 port 1186: Connection done from wrong host ip 192.168.0.130.
error=2350
2010-05-13 15:08:50 INFO -- Error handler shutting down system
2010-05-13 15:08:50 INFO -- Error handler shutdown completed - exiting
sphase=0
exit=-1
启动不了
请教高手我的问题在哪里
页:
[1]