Skip to content

Instantly share code, notes, and snippets.

@shaneshifflett
Created February 16, 2011 20:27
Show Gist options
  • Save shaneshifflett/830115 to your computer and use it in GitHub Desktop.
Save shaneshifflett/830115 to your computer and use it in GitHub Desktop.
Change the engine types of all tables in a mysql db from the command line
mysql -u<USERNAME> -p<PASSWORD> <DB_NAME> -e "show tables" | \
grep -v Tables_in|awk '{print "ALTER table",$1" ENGINE=InnoDB;"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment