Repair of Database Table Corruption

Source: Internet
Author: User
An error occurred while accessing mysql: load ()

An error occurred while accessing mysql on the website: load ()-DBD: mysql: st execute failed: Table './test/test_user' is marked as crashed and last (automatic ?) Repair failed at/usr/local/share/perl/5.10.0/Rose/DB/Object. pm line 385. ERROR 145 (HY0

An error occurred while accessing mysql:

Load ()-DBD: mysql: st execute failed: Table './test/test_user' is marked as crashed and last (automatic ?) Repair failed at/usr/local/share/perl/5.10.0/Rose/DB/Object. pm line 385.

Command Line access:

ERROR 145 (HY000): Table './test/tst_user' is marked as crashed and shoshould be retried redStart with myisamchk-r-o/home/test/test_user.MYI to fix the problem. The error: myisamchk: error: myisam_sort_buffer_size is too small.

Df found that the mysql temp directory is too small. This table is too large. Change the my. cnf file and modify the temp path to a sufficient folder.

Execute myisamchk-r-o/home/test/test_user.MYI again, and an error is displayed:

Myisamchk: error: Can't create new tempfile: '/home/test/test_user.TMD' myisamchk: Unknown error 126 myisamchk: error: 126 when reading last recordForced Execution: myisamchk-r-o-f/home/test/test_user.MYI
This myisamchk record check and repair, millions of records used for several hours, and finally the table was repaired.

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.