Mysqldump报错问题

一、 ERROR 1114 (HY000): The table 'XXX' is full
原因:磁盘满了

二、发生上述的1114错误后,删掉日志,mysql启动失败报错
Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace.

解决:https://www.cnblogs.com/barneywill/p/10532996.html
修改my.cnf,添加
innodb_force_recovery=1
再重启正常,但是各种报错
CREATE TABLE bad_table ENGINE=MyISAM ...
rm bad_table.ibd
DROP TABLE bad_table
CREATE TABLE bad_table ENGINE=INNODB ...
然后再恢复数据

也有可能报错时并没有指出具体出错的文件或者表,类似
2019-11-25T12:54:59.258844Z 0 [ERROR] InnoDB: Database page corruption on disk or a failed file read of page [page id: space=0, page number=593]. You may have to recover from a backup.

这时需要使用mysqlcheck命令来检查某个数据库

mysqlcheck -uroot -proot $dbname

三、ERROR 1050 (42S01) at line 25: Table 'zq_xbh_test.auth_assignment' already
原因:是上述ERROR 1114的遗留问题,之前虽然因为磁盘空间失败了,但是有数据保留在mysql的tablesapce,你创建导入的数据库就会自动创建一个表的xxx.ibd文件,而table表是由ibd数据文件和frm表结构文件组成,自然就报错

四、ERROR 1030 (HY000) at line 25: Got error 168 from storage engine
mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table file_storage at row: 29
该问题属于机器的磁盘空间或mysql的临时目录 不足所引起的。
可以通过df -h来查看磁盘空间的使用情况。
show variables like '%dir%'

五、mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table zq_ticket_store_33 at row: 171391
原因:排查了my.cnf参数等问题,查看dmesg日志(dmesg -T),发现是mysql内存过多导致内存OOM溢出,系统自动把mysqld进程杀了
解决:修改配置文件,修改查询缓存等参数

猜你喜欢

转载自www.cnblogs.com/wangchengshi/p/12364465.html
今日推荐