This article mainly introduces several issues in MySQL recovery. For more information, see the following: I have a BuyVM VPS, then I opened a new one for me and asked me to export the backup. most of the data was actually saved. then there is a recovery process. web restoration is not difficult. the problem lies in the restoration of MySQL.
1. The data directory is complete, but no table can be read. show tables is blank.
First, I suspected that there was a problem with the data directory and tried to fix the problem. the system prompts that there is no table. the system prompts me if there is a problem with the user group. specify the user group as mysql to solve the problem.
The code is as follows:
chown -R mysql /var/lib/mysql
2. fix the problem.
The code is as follows:
warning : Table is marked as crashed and last repair failedwarning : 1 client is using or hasn't closed the table properlywarning : Size of datafile is: 32453700 Should be: 32376944error : Wrong bytesec: 0-0-0 at linkstart: 32453660
According to the prompt, it is the data file owner problem. it turns out that it is root. Give it mysql and solve it.
The code is as follows:
chown -R mysql.mysql /var/lib/mysql
3. after the repair is completed, a table Error is prompted: Incorrect information in file: './aaa/bbb. frm '.
Failed to try various repair methods. Google found that. frm only stores the table structure. table structure? Try overwriting the file with the same table structure. delete bbb. frm, copy the ccc. frm in a database, and change it to bbb. frm!
In a word, multiple backups are king, and mysql always encounters various problems in disk transfer.
The above is the solution to several problems in MySQL recovery _ MySQL content. For more information, please follow the PHP Chinese network (www.php1.cn )!