How to recover data from MySql Data files?
One of my servers' OS crashed yesterday. It was Win 2008.The server developed an HDD fault and did not boot.
My host provider (Turnkey) has mounted the HDD on a Rescue system and given me access to the HDD through SSH. I have been able to download the Mysql data folder and all the MYD, MYI, FRM files. (MyIsam db?).
I tried changing my local computer's data folder to the backup data folder but MySql didn't run with this data folder. At my other server the db showed up but it was empty!
I believe this could be happening due to version differences in the MySql files.
Is there any way I can recover this data? A tool maybe, or a way?
Also
- How can I find the version of mysql from 开发者_运维问答the data files or the bin folder.
Thanks for the help guys!
Copy the folders of data files (MYD, etc) to your local data directory but skip the 'mysql' folder (too version specific and might not be right for the local setup). Compare the directory structure to your local files to make certain that they're in the right place. On linux, I would check the file ownership and permissions but don't know how important this is on Windows.
Restarting your local mysqld should recognize the new database(s). I'll presume that you're running with full DB permissions for this. If they show up, use check table
. If they don't, run myisamchk
externally.
精彩评论