mysql cluster导表时报1114问题

mysql-cluster插入数据时报表满错误(code 1114),导致的原因有很多,如内存不足、磁盘空间不够等等

错误如:ERROR 1114 (HY000) at line 54: The table 'xxxx.user' is full

 

查询方法:你分配的内存或者硬盘空间已经用完(如果你采用磁盘表的话),需要通过ndb管理节点客户端和登录mysql查看具体的原因,通过ndb_mgm登录,执行命令:All report memory

   如下:

            Node 2: Data usage is 95%(4 32K pages of total 2560)
            Node 2: Index usage is 94%(8 8K pages of total  2304)
            Node 3: Data usage is 95%(4 32K pages of total 2560)
            Node 3: Index usage is 94%(8 8K pages of total  2304)

解决方法如下:

1.关闭cluster:在管理节点上用命令 [root@sg204 mysql-cluster]# bin/ndb_mgm -e shutdown

   出现提示

Connected to Management Server at: localhost:1186
3 NDB Cluster node(s) have shutdown.
Disconnecting to allow management server to shutdown.

可以看到管理节点和数据节点已经关闭

或者在 ndb_mgm>下 用命令 id stop 来关闭,如管理节点的Id为1,用ndb_mgm> 1 stop 即可关闭管理节点

2.修改管理节点上的配置文件config.ini

[NDBD DEFAULT]
NoOfReplicas= 2
DataMemory = 4096M
IndexMemory = 800M
BackupMemory = 63M

将DataMemory改为4096M,IndexMemory改为800M(或者直接改成2G或者更大)

3.启动mysql-cluster,启动顺序为 管理节点——数据节点——SQL节点

  启动管理节点:[root@sg204 mysql-cluster]# libexec/ndb_mgmd -f /opt/mysql-cluster/etc/config.ini --reload

 注意:一定要加上--reload 不然新配置的config.ini文件不会生效,用的还是缓存冲老的config.ini (经尝试,如果不加--reload,重启也不好使,感觉是mysql的一个bug)

  启动数据节点:[root@sg206 mysql-cluster]# libexec/ndbd

OK这时cluster已经按新的config.ini配置文件来运行了,进到管理节点,输入命令查看

[root@sg204 mysql-cluster]# bin/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 @10.30.9.206 (mysql-5.1.56 ndb-7.1.19, Nodegroup: 0, Master)
id=3 @10.30.9.207 (mysql-5.1.56 ndb-7.1.19, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1 @10.30.9.204 (mysql-5.1.56 ndb-7.1.19)

[mysqld(API)] 2 node(s)
id=4 @10.30.9.208 (mysql-5.1.56 ndb-7.1.19)
id=5 @10.30.9.211 (mysql-5.1.56 ndb-7.1.19)

ndb_mgm> all report memory;
Node 2: Data usage is 0%(22 32K pages of total 131072)
Node 2: Index usage is 0%(16 8K pages of total 102432)
Node 3: Data usage is 0%(22 32K pages of total 131072)
Node 3: Index usage is 0%(16 8K pages of total 102432)

 

    

    

 

 

 

  

 

转载于:https://www.cnblogs.com/scai-fxh/p/10501745.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值