Created
March 31, 2012 05:05
-
-
Save ofus/2259518 to your computer and use it in GitHub Desktop.
Convert MyISAM tables to InnoDB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -p -e "show tables in $DATABASE_NAME;" | tail --lines=+2 | xargs -i echo "ALTER TABLE {} ENGINE=INNODB;" > /tmp/alter_table.$DATABASE_NAME.sql | |
mysql --database=$DATABASE_NAME -p < /tmp/alter_table.$DATABASE_NAME.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment