'innodb' Tag

  • Convert MySQL Tables: MyISAM to InnoDB

    July 20, 2009

    Not getting into the whole which engine is the best debacle, since obviously, like most important questions in life the answer is: “It depends.”

    In addition, most of what is written here can be used to convert from any engine to any engine, and thus answering any specific needs your might have.
    I needed to convert MyISAM to InnoDB so here it is.

    Without further ado…

    As far as I know, there are two basic ways to accomplish this:

    1.  ALTER TABLE 'tablename' ENGINE = InnoDB

      For each table in the database.

    2. Dump the table, edit the dump file where it says “CREATE TABLE” and fix to the preferred engine, and then reload the data back into the DB

    Obviously, these methods are ok when you are dealing with a few tables, however a while ago we had a client with a huge database with over 50 tables, so of course, a script was in place.

 
Powered by Wordpress. Theme by Shlomi Noach, openark.org
Hosted by Evolution On-line