Created
August 18, 2014 08:40
-
-
Save filviu/e190fbf580ab3d8d70b3 to your computer and use it in GitHub Desktop.
Migrate innodb to myisam (low memory systems)
This file contains 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
#!/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