免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2225 | 回复: 0
打印 上一主题 下一主题

mysql 集群问题,困惑了! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-04-15 11:12 |只看该作者 |倒序浏览
本帖最后由 ayl001 于 2010-04-15 14:22 编辑

错误:
[root@localhost ~]# ndbd
2010-04-15 17:02:20 [ndbd] INFO     -- Unable to alloc node id
2010-04-15 17:02:20 [ndbd] INFO     -- Error : Could not alloc node id at 192.168.100.118 port 1186: No free node id found for ndbd(NDB).
error=2350
2010-04-15 17:02:20 [ndbd] INFO     -- Error handler restarting system
2010-04-15 17:02:20 [ndbd] INFO     -- Error handler shutdown completed - exiting
sphase=0
exit=-1

管理节点(好像正常啊):
[root@localhost mysql-cluster]# 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.100.119  (mysql-5.1.44 ndb-7.1.3, Nodegroup: 0, Master)
id=3    @192.168.100.120  (mysql-5.1.44 ndb-7.1.3, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @192.168.100.118  (mysql-5.1.44 ndb-7.1.3)

[mysqld(API)]   1 node(s)
id=4    @192.168.100.119  (mysql-5.1.44 ndb-7.1.3)

ndb_mgm>
ndb_mgm> quit
管理节点,配置文件

[root@localhost mysql-cluster]# more config.ini
[NDBD DEFAULT]
NoOfReplicas=2    # Number of replicas
DataMemory=80M    # How much memory to allocate for data storage
IndexMemory=18M   # How much memory to allocate for index storage
MaxNoOfOrderedIndexes= 512

                  # For DataMemory and IndexMemory, we have used the
                  # default values. Since the "world" database takes up
                  # only about 500KB, this should be more than enough for
                  # this example Cluster setup.

# TCP/IP options:
#[TCP DEFAULT]     
#portnumber=2202   # This the default; however, you can use any
                  # port that is free for all the hosts in cluster
                  # Note: It is recommended beginning with MySQL 5.0 that
                  # you do not specify the portnumber at all and simply allow
                  # the default value to be used instead

# Management process options:
[NDB_MGMD]
id=0                     
hostname=192.168.100.118           # Hostname or IP address of MGM node
datadir=/var/lib/mysql-cluster  # Directory for MGM node logfiles

# Options for data node "A":
[NDBD]
id=2                          
                                # (one [NDBD] section per data node)
hostname=192.168.100.119           # Hostname or IP address
datadir=/usr/local/mysql/data   # Directory for this data node's datafiles

# Options for data node "B":
[NDBD]
id=3                          
hostname=192.168.100.120           # Hostname or IP address
datadir=/usr/local/mysql/data   # Directory for this data node's datafiles
[MYSQLD]
[MYSQLD]

存储和sql节点在一起,配置如下
datadir=/usr/local/mysql/data/       //脮脌要脫鹿脺铆碌茫config.ini脧同
  ndbcluster
  ndb-connectstring=192.168.100.118
  [ndbd]
  connect-string=192.168.100.118
  [mysql_cluster]
  ndb-connectstring=192.168.100.118
  [ndb_mgm]
  connect-string=192.168.100.118
  [ndb_mgmd]
  config-file=/var/lib/mysql-cluster/config.ini  

数据不能同步,还报上面的错误!困惑啊!而且SQL节点也少一个呀!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP