After using WordPress for such a long time, I occasionally remember to back up the data. The last time I used wp xml, I configured my machine's Environment basically the same as that of the host provider, there was a MySQL database packaging and backup service over there, so I tried it. No matter which time point I downloaded the backup package, there are only 10 frm files in the WP table, copy them to my database directory and access the Web without any data! I don't understand it anymore. I used to think that the greatest convenience of using MySQL was that database files could be copied and pasted directly. Later, I recommended that all people around me use it. However, I haven't carefully studied this well-received product for such a long time. I almost don't do backend development. I can say that there are not many use cases. So this copy table has no effect and I don't know why.
He also thought it strange to discuss with Xiao Li. In addition, he and I use a service provider. Normally, he never encountered any problems with backup. So he asked him to compare his database backup and open the RAR package, N files more than my WP! For more information, see WP table names. However, each table name corresponds to three files:. frm,. MYD,. myi. Here is the problem. Literally, FRM is a table structure, MYD is a MySQL data file, and myi should be an index. The database I backed up only has the frm structure of 10 tables. Of course, no data can be seen!
Why is my database incomplete for the same service provider? The problem is that my website has data! No way for the moment. I went to the service provider for consultation, so he verified the problem I described and again stated to me-"There is indeed no MYD file, and it cannot be backed up "! I'm dizzy ~! After finding a friend of my service provider, he said that he would continue to issue questions to solve the problem on the technical side. I asked them again how to completely solve the problem of backing up the database, the answer to the result is my statement-"No backup available "! If I hadn't looked at my friend's face, I would have been scolded! Even if the technology of such a service provider is really untrustworthy, go to Baidu to find the answer!
Input question: "MySQL has no MYD". I mentioned several situations and only mentioned a valuable word-InnoDB. This is not the statement that selects the Data Engine when creating a table. SQL statements always exist, but never asked why to write this statement. Based on this keyword, I finally found the answer. This is the difference between the two engines of MySQL, InnoDB and MyISAM. I used to hear that InnoDB was acquired, and MySQL developed MyISAM for its own version 6.0. Find two articles to introduce the differences between the two engines:
- Explain the differences between "InnoDB" and "MyISAM"
- Simple Performance Test of MyISAM engine and InnoDB Engine in MySQL
Finally, I have a little understanding. However, the "details" of "detailed explanation" is a bit false, but the "simple" of "simple test" is very real. Locate the problem and find the Final Solution. in phpMyAdmin, enter the SQL statement:
Alter table 'your _ table_name 'type = MyISAM;
Convert the engines of all tables to MyISAM, And the MYD file for storing data is displayed. After the local test is complete, the server executes the command again. Back up the database again and package the MYD file!