Table is marked as crashed and should be repaired

Source: Internet
Author: User

The error is as follows:

Hibernate operation:could not execute query; Uncategorized SQLException for SQL [select COUNT (*) as y0_ from the customer this_ where this_.customer_type=? ORDER by This_. ID DESC]; SQL state [HY000]; Error code [1194]; Table ' This_ ' is marked as crashed and should be repaired; Nested exception is Java.sql.SQLException:Table ' This_ ' are marked as crashed and should be repaired

Workaround:

Table './tablename/posts ' is marked as crashed and should be repaired

Note that the Forum post table posts is flagged with a problem and needs to be repaired. I remember having had similar problems before, but just click on the Repair button on phpMyAdmin to fix it automatically, but this time it's absolutely nothing. So get online and find out why. Eventually the problem is solved. Here's how to fix it:

Locate the Bin/myisamchk tool for the MySQL installation directory and enter it at the command line:

Myisamchk-c-R. /data/tablename/posts. MYI

Then the Myisamchk tool will help you recover the index of the data table. As if you don't have to restart MySQL, the problem is solved.

You can solve this problem if you come across it.

Table is marked as crashed and should be 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.