mysql错误日志中打印“The table xxx is full”的处理方法

某现场项目的mysql错误日志中打印

2019-03-17 17:55:02 11718 [ERROR] /usr/sbin/mysqld: The table 'member_mini_info' is full
2019-03-18 17:55:03 11718 [ERROR] /usr/sbin/mysqld: The table 'member_mini_info' is full
2019-03-19 17:55:03 11718 [ERROR] /usr/sbin/mysqld: The table 'member_mini_info' is full

show create table mob_report.member_mini_info;
发现是内存表
show variables like ‘max_heap_table_size’
发现是16M

查看该表实际已占用的大小

select table_name, truncate(sum(data_length)/1024/1024,2) as data_size_MB,
truncate(sum(index_length)/1024/1024,2) as index_size_MB
from information_schema.tables where table_schema = ‘mob_report’
group by table_name
order by data_size_MB desc;

在这里插入图片描述
刚好16M

解决方法:

mysql出现"the table is full"的问题,一般有两个原因:
一 .You are using the MEMORY (HEAP) storage engine; in this case you need to increase the value of the max_heap_table_size system variable. See Section 5.1.3, “Server System Variables”.

ERROR 1114 (HY000) at line 1720: The table ‘XXXX’ is full

于是就修改Mysql的配置文件my.ini,在[mysqld]下添加/修改两行:
tmp_table_size = 256M
max_heap_table_size = 256M

系统默认是16M,修改完后重启mysql

二.硬盘空间满了,清理硬盘即可.
不要被mysql的安装目录所欺骗, 最好亲自去看看数据存放目录是哪
在my.ini 搜索 datadir

猜你喜欢

转载自blog.csdn.net/weixin_42657120/article/details/88681979