Skip to content

Instantly share code, notes, and snippets.

@filviu
Created August 18, 2014 08:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Migrate innodb to myisam (low memory systems)
#!/bin/bash
mysql -B -N -e "SHOW DATABASES" | while read database;
do
mysql -B -N -e "SHOW TABLES" $database | while read table; \
do \
echo "+ Converting Table $table"; \
mysql -B -N -e "alter table $table engine=myisam" $database; \
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment