Skip to content

Instantly share code, notes, and snippets.

@stemwinder
Created May 17, 2017 02:33
Show Gist options
  • Save stemwinder/739cfbc0ab0b89ca051f00fb9e9d4db0 to your computer and use it in GitHub Desktop.
Save stemwinder/739cfbc0ab0b89ca051f00fb9e9d4db0 to your computer and use it in GitHub Desktop.
Generate SQL statements to convert all database tables from MyISAM to InnoDB
SELECT CONCAT('ALTER TABLE ', TABLE_SCHEMA, '.', TABLE_NAME, ' engine=InnoDB;')
FROM information_schema.TABLES WHERE ENGINE = 'MyISAM';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment