-2

I wanna ask something. i am not so good at this so thought i should ask here. My previous server was crashed and they gave me my site's data back after some days of restoration. All i got was my site's data and everything. But they did not give me my sql database in ".sql" format. I just know a single way to import database from phpmyadmin. Now they gave me a folder with some "ibd", "frm", "MYD", "MYI" files. I dont know about how i can convert all these files into one single .sql file. Or how i can import my database from these. Please give me an easy solution because i am not used to the coding or command lines stuff.

1 Answers1

1

These files are the "databases". Cit to thy mysql data directory, start mysql and your tables should be shown. The data Directory is different on different OS. So I can not say where it is.

Attention: the Version of the database which creates the files must be the same the Version do you use.

Here a link that can help you find the directory: http://www.mkyong.com/mysql/where-does-mysql-stored-the-data-in-my-harddisk/

Jens
  • 67,715
  • 15
  • 98
  • 113
  • This question refers : http://stackoverflow.com/questions/2845015/importing-old-mysql-data-folder – Gavin Simpson Jan 30 '15 at 19:20
  • @GavinSimpson Then you should vote Close-->duplicat of. – Jens Jan 30 '15 at 19:21
  • I don't think I can do that yet... but you are right of course. – Gavin Simpson Jan 30 '15 at 19:23
  • Those that you say is a duplicate, That doesnt solve my problem at all. As i said i am a newbie. I dont know that stuff. Just tell me step by step what can should i do to convert that database folder to an sql file????? – Zubair Ismail Feb 01 '15 at 10:51
  • @ZubairIsmail You can not change these files to SQL file. Mysql stores the data in files. And what you have are exectly such files. – Jens Feb 01 '15 at 10:55
  • After some hit and trial methods, I got to recover my small databases which had MYI and MYD files in their database fodlers, i just copied and pasted into mysql data folder. It loaded fine and i exported them as sql files...Success so far... – Zubair Ismail Feb 01 '15 at 20:54
  • BUT My big databases that contain only ibd and frm files are still not recovered. I copied that folder too into mysql data folder. But it doesnt read ibd files directly....Please tell me step by step to make them being readable by mysql or phpmyadmin. Thanks.. ALso i will appreciate if you tell some method that does not involve command lines etc – Zubair Ismail Feb 01 '15 at 20:56
  • @ZubairIsmail `IDB` files are `InnoDB` files. Make sure your MySQL instance is configured to work with InnoDB. How you can check it you cen see [here](http://thesystemadministrator.net/cpanel/how-to-check-if-innodb-is-enabled-in-mysql-server). If it is enabled you should be able to open the database files. – Jens Feb 02 '15 at 06:26