MySQL Repair corrupted table considerations

Source: Internet
Author: User


Resources:

Http://blog.chinaunix.net/uid-405749-id-28215.html

Http://www.cnblogs.com/xiaoit/p/3990304.html

Http://www.jb51.net/article/25873.htm

The process of recovering a damaged table on an online operation:

mysql> Check table tbl_referer05;

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

| Table | Op | Msg_type | Msg_text |

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

| drnew_monitor.tbl_referer05 | Check | Warning | Table is marked as crashed and last repair failed |

| drnew_monitor.tbl_referer05 | Check | Warning | Clients is using or haven ' t closed the table properly |

| drnew_monitor.tbl_referer05 | Check | Warning | Size of datafile is:672742692 should be:672710844 |

| drnew_monitor.tbl_referer05 | Check | Error | Found Keys of 1998767 |

| drnew_monitor.tbl_referer05 | Check | Error | corrupt |

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

5 rows in Set (0.00 sec)


mysql> repair table tbl_referer05;;

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

| Table | Op | Msg_type | Msg_text |

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

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 152960; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 184660; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Wrong bytesec:101-98-75 at 488558800; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 965508; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 985580; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 989772; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Wrong bytesec:116-116-112 at 488561736; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 2422076; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 2876164; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Wrong bytesec:51-48-49 at 488606848; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 3184428; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Wrong bytesec:105-46-99 at 488626364; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Wrong bytesec:52-51-46 at 488626384; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 3910968; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Wrong bytesec:37-50-50 at 488642480; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Wrong bytesec:50-50-54 at 488642504; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 4270476; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 4278508; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 4812248; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Wrong bytesec:59-32-122 at 488696156; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 5240200; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 5272204; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Wrong bytesec:15-0-at 488710432; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 5840716; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 5864136; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 5887872; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Delete link points outside datafile at 488724136 |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 6467604; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Wrong bytesec:53-46-55 at 488748676; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 6736884; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 6744696; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 6949524; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 6993404; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 7012028; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Wrong bytesec:116-112-58 at 488789212; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 7475056; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 7636404; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 7725468; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 7744088; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Wrong bytesec:24-0-133 at 488825908; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 8226208; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 8286068; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Wrong bytesec:53-54-47 at 488843692; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Wrong bytesec:59-32-119 at 488857180; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 8646640; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Wrong bytesec:101-114-47 at 488868524; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 8909900; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 8975320; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 8995780; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 583596204; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 594127704; Skipped |

| drnew_monitor.tbl_referer05 | Repair | info | Found block with too small length at 594215860; Skipped |

| drnew_monitor.tbl_referer05 | Repair | Warning | Number of rows changed from 1998767 to 1951358 |

| drnew_monitor.tbl_referer05 | Repair | Status | OK |

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

163 rows in Set (26.67 sec)

mysql> Check table tbl_referer05;

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

| Table | Op | Msg_type | Msg_text |

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

| drnew_monitor.tbl_referer05 | Check | Status | OK |

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

1 row in Set (5.16 sec)


mysql> Repair table tbl_referer05;

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

| Table | Op | Msg_type | Msg_text |

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

| drnew_monitor.tbl_referer05 | Repair | Status | OK |

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

1 row in Set (26.54 sec)

mysql> repair table tbl_referer06;;

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

| Table | Op | Msg_type | Msg_text |

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

| drnew_monitor.tbl_referer06 | Repair | info | Wrong block with wrong total length starting at 414722584 |

| drnew_monitor.tbl_referer06 | Repair | Warning | Number of rows changed from 1440927 to 1440926 |

| drnew_monitor.tbl_referer06 | Repair | Status | OK |

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

3 Rows in Set (26.94 sec)


This article is from the "10931853" blog, please be sure to keep this source http://wujianwei.blog.51cto.com/10931853/1959436

MySQL Repair corrupted table considerations

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.