2020-05-08

convert an InnoDB database to MyIsam

The problem of Innodb is that you can’t copy the database tables from a PC to another or from localhost to an online website, because of the file “ibdata1”, which is out of the tables folder.

So I think that the best solution, if you need to sync your database between different locations, is to convert Innodb tables into MyIsam tables, which can be copied without problems.

Unfortunately I didn’t find a way to convert a whole database with a single mysql command, but I had to convert each table, with this code:

ALTER TABLE table_name ENGINE=MyISAM.

But at the end the result was any way good.

No comments:

Post a Comment

Blog Archive