当前位置:Gxlcms > 数据库问题 > mysql cluster导表时报1114问题

mysql cluster导表时报1114问题

时间:2021-07-01 10:21:17 帮助过:26人阅读

错误如: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)

 

    

    

 

 

 

  

 

mysql cluster导表时报1114问题

标签:启动mysql   dex   mysql   报表   back   mysq   down   The   error   

人气教程排行