Can 'topenfile:/& amp; #039; [Table] mytable. MYI/& amp; _ MySQL
Source: Internet
Author: User
Can 'topenfile: amp; #039; [Table] mytable. MYIamp; amp; #039; maybe many people have encountered a problem similar to Can 'topenfile: '[Table] mytable. the myi' error message does not know how to solve it. let's introduce it as follows,
In most cases, the database is damaged only when the index file is damaged, and the real data is damaged rarely. Most forms of database corruption can be easily repaired.
As with the previous verification, there are three methods to fix the vulnerability.
The method described below is only valid for tables in MyISAM format. Other types of damages must be recovered from the backup.
1. REPAIRTABLESQLstatement (mysql service must be running ).
2. command mysqlcheck (mysql service can be running ).
3. command myisamchk (mysql service must be stopped or the operated table is inactive ).
When repairing a table, you 'd better back up the table first. So you need two times the hard disk space of the original table. Make sure that your disk space is not used up before the restoration.
1> use the "repairtable" method to fix
Syntax: repairtable table name [option]
The options are as follows:
QUICK is the fastest speed when the data table has not been modified
EXTENDED attempts to restore each data row will produce some junk data rows.
USE_FRM is used when the. MYI file is lost or the header is damaged. Re-indexing using the definition of. frm
In most cases, you can simply use "repairtabletablename" without the option. However, this method does not work when the. MYI file is lost or the header is damaged. for example:
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