Skip to content

Instantly share code, notes, and snippets.

@oliverlundquist
Created July 28, 2016 08:37
Show Gist options
  • Save oliverlundquist/f8d7725d6a3f719e967272736ef96505 to your computer and use it in GitHub Desktop.
Save oliverlundquist/f8d7725d6a3f719e967272736ef96505 to your computer and use it in GitHub Desktop.
Alter Table
MYSQL_PWD=root mysql --host="0.0.0.0" --user="root" --batch --skip-column-names --execute "SELECT CONCAT('ALTER TABLE ' , TABLE_SCHEMA , '.' , TABLE_NAME , ' ENGINE = InnoDB;') FROM INFORMATION_SCHEMA.TABLES WHERE ENGINE = 'MyISAM' AND TABLE_NAME LIKE '%_mystore_no_%'" | MYSQL_PWD=root mysql --force --host="0.0.0.0" --user="root"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment