Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I override the ENGINE=INNODB parameter while importing a MySQL dump file?

I have a big dump (tens of GB) and I would like to import it into a new table without respecting the ENGINE=INNODB parameter.

I tried several editors dedicated for large files to edit the dump but it always takes a lot of time to save the modifications, so it would make much more sense to just ignore the ENGINE=INNODB parameter and override it (for example with the default engine).

Importing and then changing the engine would not be an option as InnoDB is extremely slow to import the dump, so it would take days.

like image 575
Erwin Mayer Avatar asked Oct 12 '11 12:10

Erwin Mayer


2 Answers

mysqldump --compatible=no_table_options

worked for me

like image 191
Paul van Helden Avatar answered Sep 24 '22 18:09

Paul van Helden


If you are on a linux/unix system how about an in place edit with sed

sed -i 's/ENGINE=INNODB/ENGINE=MYISAM/g' filename
like image 28
Adrian Cornish Avatar answered Sep 25 '22 18:09

Adrian Cornish