Caused by: java.sql.SQLException: The table ‘XXX’ is full(mysql the table is full)

Caused by: java.sql.SQLException: The table ‘XXX’ is full(mysql the table is full)
1.查看报错日志


查看 mysql 官方给出的解释

有可能可能导致报错:
    1. 你的磁盘满了
    2. 你的表数据太多了

2. 排查
表数据太多了

网上说的如果mysql5.6版本单表数据超过16M就会报这个异常,大概将近百万数据才会达到16M吧,我的表300多条数据才0.5M,命令如下。


1. use information_schema;

2. select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='你的数据库的名称' and table_name='你的表名称';


我看下我的 才 0.5M

那就是磁盘满了

好家伙,果然满了,最近在看《山海情》。满嘴方言hhh。命令如下


df -h


好吧昨天忘记截图了 就是 第一行你会看到100%

等一下,哪里满了。为了证明我不是个垃圾外包,我要解决问题,而不是给领导说问题。


du -s -h /* | sort -nr


看一下哪个文件夹占用多 ,然后继续跟踪。比如 /ext/ 这个文件夹占用的多


du -s -h /ext/* | sort -nr


我的原来是mysql的binlog日志导致磁盘满了。我就联系运维给清除了

怎么清除的你去百度吧。

你好,我叫百度

清理binlog文件,我最常用的命令


rm -rf mysql-bin.00040*;

vim mysql-bin.log.index

清除掉里面的mysql-bin.0004**纪录

=关闭binlog日志=========

但是如果你不需要binlog日志你可以关闭

全局找一下它


find /* -name my.cnf


我竟然没找到

好吧,看看用哪个配置文件启动的


ps -ef|grep mysql


不对啊,这个人已经将 log-bin注释了啊

真坑,看下mysql启动时间


ps -eo pid,lstart,etime,cmd | grep mysql


再看下 my.cnf文件的修改时间


stat /export/common/mysql/conf/3306-my.cnf


对比两个时间发现这个人修改完配置没有重启。。。。。
 

猜你喜欢

转载自blog.csdn.net/qq_34823218/article/details/119639539