Jump to content

Convert MyISAM to InnoDB


Recommended Posts

After many headaches for altering the tables, this was the best way for me:

It hasn't been mentioned yet, so I'll write it for posterity:

If you're migrating between DB servers (or have another reason you'd dump and reload your dta), you can just modify the output from mysqldump:

mysqldump --no-data DBNAME | sed 's/ENGINE=MyISAM/ENGINE=InnoDB/' > my_schema.sql;
mysqldump --no-create-info DBNAME > my_data.sql;
Then load it again:

mysql DBNAME < my_schema.sql && mysql DBNAME < my_data.sql
(Also, in my limited experience, this can be a much faster process than altering the tables ‘live’. It probably depends on the type of data and indexes.)

http://stackoverflow.com/questions/3856435/how-to-convert-all-tables-from-myisam-into-innodb

Link to comment
Share on other sites

One thing you have to have in mind before moving is that InnoDB/ExtraDB uses more server resources than MyISAM, namely more CPU load and more RAM. You have to make sure you have enough available RAM in particular.

That said, InnoDB/ExtraDB is a must for performance reasons.

After migration, you will also need to make several fine-tunings to your my.cnf file.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...