You've realized that your weekly table dumps only include .frm files, leaving you without crucial .MYD and .MYI files. Your database uses the InnoDB storage engine. Is it feasible to restore your database with intact data using only the available .frm files?
Yes, it is possible to restore your database from .frm files with data intact. However, the process requires more than simply copying the .frm files to the database directory.
Along with the .frm files, you must also copy the following files to the data folder:
After transferring these files, restart the server. Your database should be successfully restored.
Once the files have been copied, execute the following command:
sudo chown -R mysql:mysql /var/lib/mysql
This command alters the file and folder ownership to the MySQL user, enabling MySQL to access the .frm and ibdata files.
The above is the detailed content of Can I Restore My MySQL Database with Only .frm Files?. For more information, please follow other related articles on the PHP Chinese website!