Can't open file: '% s. myi' Solution

Source: Internet
Author: User

  Error No:145

  Problem Analysis:

In this case, % s. MYI cannot be opened. The possible causes include:

1. The server shuts down abnormally, the database space is full, or some other unknown reasons cause damage to the database table.

2. This error occurs when database files are directly copied and moved in unix-like operating systems due to file group issues.

  Solution:

1. Repair Data Tables

You can use the following three methods to repair data tables: (the second method is only applicable to standalone host Users)

1) use tools. php to restore the file: http://www.bkjia.com/a/view/8016.html. then, upload the file to the server program directory, for example, access through http: // site address/tools. php;

2) using myisamchk, MySQL comes with a dedicated user data table check and Repair Tool-myisamchk. Change the current directory to the bin directory of the MySQL installation directory. Generally, the myisamchk command can be run only under this directory. Common repair commands are as follows:

Myisamchk-r data file directory/data table name. MYI;

Myisamchk-r data file directory/data table name. MYI;

3) Use phpMyAdmin to fix the data table. phpMyAdmin provides the data table repair function. after entering a table, click "operate" and click "repair table" in "Table maintenance" below.

Note: You must back up the database before performing the preceding three restoration methods.

2. Modify the file group (only applicable to independent host Users)

1) When copying a database file, the database file is not set to an account running MySQL that can be read and written (generally applicable to Linux and FreeBSD users ).

Related Article

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.