您的位置:首页 > 数据库 > MySQL

mysqldump 导出数据库出错

2016-04-09 21:03 387 查看
今天linux 下导出数据库出错,如下:

mysqldump: Couldn't execute 'show create table `wp_weixin_log`': Table './xiawu1/wp_weixin_log' is marked as crashed and should be repaired (145)

mysql> check tables wp_weixin_log;

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

| Table | Op | Msg_type | Msg_text |

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

| xiawu1.wp_weixin_log | check | warning | Table is marked as crashed |

| xiawu1.wp_weixin_log | check | warning | 3 clients are using or haven't closed the table properly |

| xiawu1.wp_weixin_log | check | error | Size of indexfile is: 806912 Should be: 807936 |

| xiawu1.wp_weixin_log | check | error | Corrupt |

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

4 rows in set (0.04 sec)

mysql> repair table wp_weixin_log

-> ;

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

| Table | Op | Msg_type | Msg_text |

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

| xiawu1.wp_weixin_log | repair | status | OK |

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

1 row in set (1.25 sec)

[root@iZ94d42de1jZ www]# mysqldump -u root -pxxxxxx xiawu1 --lock-tables=false > /alidata/xiawu.sql

[root@iZ94d42de1jZ www]#

导出成功
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: