Ron Ron - 7 months ago 16
SQL Question

Database as it is raw content

Hi recently i tell to my host to give the backup of my database . I tell them to create a new database and import backup to that database .

But they reply "


cannot dump database because as it is raw content


"
But what is raw data ? How i can import that files in .sql format ?

I check the given backup . It is .tar format . I extract the files and it containing
.ibd,.frm,.MYD,.MYI
. Please anyone explain what i need to do now ?

How can i run this sql in xampp ,phpmyadmin .

Answer

It's seems like hosting team simply giving the copy of mysql database folder instead of giving the .sql files

For to open this .ibd files in xaamp

copy the files to xaamp->mysql->data -> paste the folder

If your mysql version is match/compatible with server mysql version then you can open tables and operate (not sure, but most cases it wil work )

But if it's not compatible/ two mysql version not match then you need to do some sql operation otherwise when you open tables in database you get messages like

'table1' doesn't exist in engine or Id not matching etc

For to correct it

(1)Create database in Phpmyadmin
(2)Create tabe1(table name )   
(3)Run this query 'ALTER TABLE table1 DISCARD TABLESPACE';
(4)Copy and paste  table1.ibd from your backup to xaamp->mysql->data->table1
(5)Then Run this query 'ALTER TABLE table1 IMPORT TABLESPACE';

if you have more tables you need to do the same process to other table also .

Try this method .Normally it will work ,but if any other issue in database this method will not help .