Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Convert MyISAM tables to InnoDB
## Copied from:
# Get table listing and generate ALTER sql file
$ mysql -u foobar -p -e "show tables in <database> ;" | tail --lines=+2 | xargs -i echo "ALTER TABLE {} ENGINE=INNODB;" > alter_table.sql
# Execute ALTER sql queries generated to convert from MyISAM to InnoDB:
$ mysql -u foobar -p <database> < alter_table.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment