Logical1 Posted March 11, 2009 Share Posted March 11, 2009 In trying to recover data from a crashed server I have managed to get .myd files for each of the tables.- Structure of tables where simple and they are re-created in the new server. Question is: How can I get the data from .myd files into any other format or file (deli. text/excel/access/....) that can be used to export them into the new tables? Any suggetions? Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/148875-how-to-use-myd-files/ Share on other sites More sharing options...
aschk Posted March 11, 2009 Share Posted March 11, 2009 You need to load these tables up into another MySQL installation (by placing the files into the MySQL directory structure, google it). Then you can do a mysqldump from cmd line to get a SQL script to run with most other dbs Quote Link to comment https://forums.phpfreaks.com/topic/148875-how-to-use-myd-files/#findComment-782009 Share on other sites More sharing options...
Mchl Posted March 11, 2009 Share Posted March 11, 2009 Basically if you have only myd files you've a problem. You should've backup all files (including .frm and .myi). Quote Link to comment https://forums.phpfreaks.com/topic/148875-how-to-use-myd-files/#findComment-782026 Share on other sites More sharing options...
Logical1 Posted March 11, 2009 Author Share Posted March 11, 2009 For each of tables there are three files (with extentions you mentioned). Versions of MySQL are not the same, would placing them in the corresponding directory take care of the problem? On the other hand since the new system is already prepared by making the identical tables, can't we get the data somehow out of .myd files and then export them in to the new tables? Thanks in advance for your suggestions. Quote Link to comment https://forums.phpfreaks.com/topic/148875-how-to-use-myd-files/#findComment-782441 Share on other sites More sharing options...
Mchl Posted March 11, 2009 Share Posted March 11, 2009 What was the previous MySQL version, and what is the new one. Basically you should create a database and tables with the structure coresponding to the backed up database. Then shut down the server, and copy the backed up files over the files created by new server. Note that if the MySQL versions are very different, this might not work. Quote Link to comment https://forums.phpfreaks.com/topic/148875-how-to-use-myd-files/#findComment-782462 Share on other sites More sharing options...
Logical1 Posted March 12, 2009 Author Share Posted March 12, 2009 Thank you for the suggestions. What is the structure of this file? Can't I extract the data out of them into excell or even a text file and then simply export the new data? Quote Link to comment https://forums.phpfreaks.com/topic/148875-how-to-use-myd-files/#findComment-783417 Share on other sites More sharing options...
Mchl Posted March 13, 2009 Share Posted March 13, 2009 These are binary files, so you're likely to run into problems if you try to this with text tools... It is not impossible I suppose, but tricky for sure. Quote Link to comment https://forums.phpfreaks.com/topic/148875-how-to-use-myd-files/#findComment-783578 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.