Remember the MySQL data file operation experience want to get the latest information of a project, do function upgrade use, back up a copy of data also as local test data, file a bit large, I directly through the remote phpMyAdmin program export, not happy to play, Directly contacted IDC colleague to help guide a copy of SQL file out, the result that the buddy did not throw directly to my data file, which let me how to be good, this problem I have not met Ah. In the face of the problem, but also embarrassed to let him re-send me a copy of SQL file, had to bite the bullet to try how to restore data. Environmental statementThe following actions are for actions under WindowsData file Analysis *.frm is a description of the structure of the table, *. MyD saves the data record of the table, *. Myi is the index of the table MySQL data engine with character view command (recall operation) 1. View the database encoding:
Show variables like ' character% ';
2. View the engine and default database engine code supported by the database:
Show engines;
3. View the default engine for the current database:
Show variables like '%storage_engine% ';
4. How to modify the Database engine:
Locate the configuration file for the database My.ini, look for "default-storage-engine", this designation is my current default database engine (default-storage-engine= INNODB) How to recover the data file for the My.ini file, find "DataDir", follow the path open, here is the name of all your local database now, find the library name you want to recover data, if you do not need to create a database, and then click the corresponding folder, Copy the previous data file in. Restart the MySQL service and check to see if there are any data in the database?
This article original blog address: http://www.cnblogs.com/unofficial official website address: www.pushself.com
Data files in MySQL (. FRM,. MYD,. MYI) revert to data