Convert all tables from MyISAM to InnoDB

PHOTO EMBED

Thu Oct 03 2024 21:49:44 GMT+0000 (Coordinated Universal Time)

Saved by @JosKlever ##wordpress ##sql #phpmyadmin

SELECT  CONCAT('ALTER TABLE ',table_schema,'.', table_name, ' ENGINE=InnoDB;') AS sql_statements
FROM    information_schema.tables AS tb

WHERE 	table_schema NOT IN ('information_schema', 'sys', 'performance_schema','mysql')
AND     `ENGINE` = 'MyISAM'
AND     `TABLE_TYPE` = 'BASE TABLE'
ORDER BY table_schema, table_name;
content_copyCOPY

Copy and paste the result as a new query to do the actual conversion.