您的位置:首页 > 其它

1033 incorrect information in file: './lxbd_db_00/t_longxibendi_info_00_1.frm'

2012-01-04 13:31 281 查看
一.问题描述

1.今天qa反映个问题。

mysqldump导入数据报错。

2.初步判断:

1.)磁盘损坏、文件系统损坏。

2.)表损坏。

3.)主从数据库版本不一致。

4.)配置有问题。

3.登录数据库,发现,该表是innodb表。

那么,用reapir,check 等,检查和修复是无济于事的。

mysql> check table lxbd_db_00.t_longxibendi_info_00_1;

+----------------------------+-------+----------+-------------------------------------------------------------------+

| Table | Op | Msg_type | Msg_text |

+----------------------------+-------+----------+-------------------------------------------------------------------+

| lxbd_db_00.t_longxibendi_info_00_1 | check | Error | Incorrect information in file: './lxbd_db_00/t_longxibendi_info_00_1.frm' |

| lxbd_db_00.t_longxibendi_info_00_1 | check | error | Corrupt |

+----------------------------+-------+----------+-------------------------------------------------------------------+

二.问题定位

后来让qa打开错误日志。

发现报以下错误

libexec/mysqld: Can't create/write to file '/tmp/ibx3NNtE' (Errcode: 28)

120104 13:01:10 InnoDB: Error: unable to create temporary file; errno: 28

这样基本原因知道了,

mysql> show variables like '%tmp%';

+-------------------+----------+

| Variable_name | Value |

+-------------------+----------+

| max_tmp_tables | 32 |

| slave_load_tmpdir | /tmp/ |

| tmp_table_size | 33554432 |

| tmpdir | /tmp/ |

+-------------------+----------+

三.问题解决

qa没有配置tmpdir,但是mysql默认使用/tmp作为 tmpdir的目录。

但是/tmp 挂载到 /root

$ df -h /tmp

Filesystem Size Used Avail Use% Mounted on

/dev/sda2 8.7G 7.2G 1.5G 83% /

大量mysqldump导入数据,导致tmp空间不够用。故而报错。

让qa重新配置tmp,这样启动mysql。问题解决。

四.总结

如果连innodb 的表 执行 check table 也报错,特别是标题中的错误。那么

注意查看tmpdir 的配置目录。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐