1.  我所有的机器上安装的都是5.1.25的rpm包,从mysql的官网上看到 要实现cluster的功能
    都必须安装 2进制的安装包   
具体安装与配置:
133.205.69.130 管理节点安装了:MySQL-client-community-5.1.25-0.rhel4
MySQL-shared-community-5.1.25-0.rhel4
MySQL-ndb-extra-5.1.23-0.glibc23
MySQL-server-community-5.1.25-0.rhel4
MySQL-ndb-management-5.1.23-0.glibc23
MySQL-ndb-tools-5.1.23-0.glibc23rpm默认的安装路径:/var/lib/mysql
/var/lib/mysql-cluster/config.ini 配置
--------------------------------------
[NDBD DEFAULT]
NoOfReplicas=1
DataMemory=80M
IndexMemory=18M
[TCP DEFAULT]
portnumber=2202
[NDB_MGMD]
hostname=133.205.69.130
datadir=/var/lib/mysql-cluster[NDBD]
hostname=172.21.188.24
datadir=/var/lib/mysql[NDBD]
hostname=172.21.188.25
datadir=/var/lib/mysql[MYSQLD]
hostname=133.205.69.131
------------------------------------133.205.69.131 sql节点MySQL-client-community-5.1.25-0.rhel4
MySQL-shared-community-5.1.25-0.rhel4
MySQL-server-community-5.1.25-0.rhel4/etc/my.cnf的设置同下的数据节点的设置172.21.188.24 & 172.21.188.25  数据节点MySQL-server-community-5.1.25-0.rhel4
MySQL-shared-community-5.1.25-0.rhel4
MySQL-client-community-5.1.25-0.rhel4
MySQL-ndb-storage-5.1.23-0.glibc23/etc/my.cnf配置
------------------------------------
[MYSQLD]
ndbcluster
ndb-connectstring=133.205.69.130[MYSQL_CLUSTER]
ndb-connectstring=133.205.69.130
-----------------------------------现象:
启动数据节点 ndbd --initial
***********************************
Unable to connect with connect string: nodeid=0,133.205.69.130:1186
Retrying every 5 seconds. Attempts left: 12 11 10 9 8 7 6 5 4 3 2 1, failed.
2008-07-16 10:43:35 [ndbd] INFO     -- Could not connect to ndb_mgmd
2008-07-16 10:43:35 [ndbd] INFO     --
error=2350
2008-07-16 10:43:35 [ndbd] INFO     -- Error handler restarting system
2008-07-16 10:43:35 [ndbd] INFO     -- Error handler shutdown completed - exiting
sphase=0
exit=-1
***********************************启动管理节点:
ndb_mgmd -f /var/lib/mysql-cluster/config.ini 
ndb_mgm  回车 
-- NDB Cluster -- Management Client --
showConnected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=2 (not connected, accepting connect from 172.21.188.24)
id=3 (not connected, accepting connect from 172.21.188.25)[ndb_mgmd(MGM)] 1 node(s)
id=1    @133.205.69.130  (Version: 5.1.23)[mysqld(API)]   1 node(s)
id=4 (not connected, accepting connect from 133.205.69.131)疑问
1.设置是否有错误
2.是否和安装的rpm包有关系,我看官网上说实现cluster必须要安装 2进制的
mysql的版本,rpm是否也是编译过的2进制的版本? 

解决方案 »

  1.   

    Make sure your firewall is not open at first.
    http://blog.chinaunix.net/u/29134/article_71956.html
      

  2.   

    你的端口号指定错误了吧?
    [TCP DEFAULT] 
    portnumber=2202 手册中是这样写的
    PortNumber (OBSOLETE) 
    This formerly specified the port number to be used for listening for connections from other nodes. This parameter should no longer be used. 你的错误信息是
    Unable to connect with connect string: nodeid=0,133.205.69.130:1186 去掉[TCP DEFAULT]的这个端口号设置,直接用默认的1186
    试试,应该可以的