Skip to content

Instantly share code, notes, and snippets.

@stigtsp
Created June 6, 2018 10:52
Show Gist options
  • Save stigtsp/d243798cfd453a04a859c7ea31c225a1 to your computer and use it in GitHub Desktop.
Save stigtsp/d243798cfd453a04a859c7ea31c225a1 to your computer and use it in GitHub Desktop.
mysql: convert all innodb tables to tokudb
set DATABASE name_of_database_goes_here
for table in (mysql $DATABASE -NBe "SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE engine = 'InnoDB' and table_schema='$DATABASE'");
echo "alter table $DATABASE.$table engine=tokudb;";
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment