How to fix persistent display of Mysql data tables

Source: Internet
Author: User


Open phpMyAdmin Select Database view, and sure enough, 3 tables are displayed as "in use." Check the "Repair table", the error can not be repaired.

Then from the "Analysis table", "Optimization table" began, failed. Failure message First: Can ' t create new temp file


1. Table Damage Reason analysis

The following are common causes of MySQL table corruption:
1, the sudden loss of power to the server caused data file corruption.
2, forced shutdown, did not first shut down the MySQL service.
3. The mysqld process was killed while writing the table.
4, the use of myisamchk at the same time, Mysqld also in the operating table.
5, disk failure.
6, the server crashed.
7, the MySQL itself bug.

2. Symptom of table damage

A typical symptom of a damaged table is as follows:
1. When selecting data from a table, you get the following error:
Incorrect key file for table: ' ... '. Try to repair it
2. The query cannot find rows in the table or return incomplete data.
3. Error:table ' P ' is marked as crashed and should to be repaired.
4, open the table failed: Can ' t open file: ' xxx. Myi ' (errno:145).

Google Solution: Force repair Myisamchk-r-F * * * * * * * *. Myi, the problem is still

Method One:

Restart MySQL, simple, generally effective.

Method Two:

Run SQL statements, login phpMyAdmin, run the following statements, most can be rejected.

CHECK TABLE ' table1 ';

ANALYZE TABLE ' table1 ';

REPAIR TABLE ' table1 ';

Method Three:

Landing phpMyAdmin, the home page has a "Status" tab, click into the Server tab there is a kill process.

Method Four:

Use Linux commands to resolve the MySQL datasheet is always displayed in use. Take the LAMPP server integration package As an example, the database displays "in use", and the operation commands are as follows:

/opt/lampp/lampp stopmysql

cd/opt/lampp/var/mysql/

/opt/lampp/bin/myisamchk-f miningplants/wp_options. Myi (database name, data table name)

/opt/lampp/lampp startmysql

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.