- 论坛徽章:
- 0
|
三台电脑 做集群 192.168.0.100为管理节点,192.168.0.120和192.168.0.130做集群节点和mysql节点
my.conf的文件内容为
[mysqld]
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
#[mysqld_safe]
#log-error=/var/log/mysqld.log
#pid-file=/var/run/mysqld/mysqld.pid
ndbcluster
ndb-connectstring=192.168.0.100
[ndbd]
connect-string=192.168.0.130,192.168.0.120
[ndb_mgm]
connect-string=192.168.0.130,192.168.0.120
[ndb_mgmd]
config-file=/etc/config.ini
[mysql_cluster]
ndb-connectstring=192.168.0.100
集群节点config.ini的内容为
[tcp default]
PortNumber=2202
[ndbd default]
NoOfReplicas=2
[ndb_mgmd]
Id=1
hostname=192.168.0.100
datadir=/var/lib/mysql-cluster
[ndbd]
Id=2
HostName=192.168.0.120
datadai=/usr/local/mysql/data
[ndbd]
Id=3
HostName=192.168.0.130
datadir=/usr/local/mysql/data
[mysqld]
[mysqld]
奇怪的是我在别的地方用虚拟机可以成功,今天在单位又做实验
192.168.0.100
[root@mysqlserver ~]# /usr/local/mysql/bin/ndb_mgmd -f /etc/config.ini
2010-05-13 15:05:20 [MgmtSrvr] INFO -- NDB Cluster Management Server. mysql-5.1.44 ndb-7.1.3
2010-05-13 15:05:20 [MgmtSrvr] 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 [ndbd] INFO -- Unable to alloc node id
2010-05-13 15:08:50 [ndbd] 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 [ndbd] INFO -- Error handler shutting down system
2010-05-13 15:08:50 [ndbd] INFO -- Error handler shutdown completed - exiting
sphase=0
exit=-1
启动不了
请教高手我的问题在哪里 |
|