The following set of command converts all default WordPress tables from InnoDB to MyISAM storage engine:
ALTER TABLE wp_commentmeta ENGINE=MYISAM; ALTER TABLE wp_comments ENGINE=MYISAM; ALTER TABLE wp_links ENGINE=MYISAM; ALTER TABLE wp_options ENGINE=MYISAM; ALTER TABLE wp_postmeta ENGINE=MYISAM; ALTER TABLE wp_posts ENGINE=MYISAM; ALTER TABLE wp_terms ENGINE=MYISAM; ALTER TABLE wp_term_relationships ENGINE=MYISAM; ALTER TABLE wp_term_taxonomy ENGINE=MYISAM; ALTER TABLE wp_usermeta ENGINE=MYISAM; ALTER TABLE wp_users ENGINE=MYISAM;
And this set does the opposite – convert MyISAM to InnoDB:
ALTER TABLE wp_commentmeta ENGINE=INNODB; ALTER TABLE wp_comments ENGINE=INNODB; ALTER TABLE wp_links ENGINE=INNODB; ALTER TABLE wp_options ENGINE=INNODB; ALTER TABLE wp_postmeta ENGINE=INNODB; ALTER TABLE wp_posts ENGINE=INNODB; ALTER TABLE wp_terms ENGINE=INNODB; ALTER TABLE wp_term_relationships ENGINE=INNODB; ALTER TABLE wp_term_taxonomy ENGINE=INNODB; ALTER TABLE wp_usermeta ENGINE=INNODB; ALTER TABLE wp_users ENGINE=INNODB;
For any other table, simply follow this format:
ALTER TABLE table_name ENGINE=YOUR_CHOICE;