Skip to content

Instantly share code, notes, and snippets.

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
You can’t perform that action at this time.