You are here

Converting between MySQL database engines

I can't remember where I got this, but this works

To convert from INNODB to MYISAM (MYSQL)

SELECT CONCAT('ALTER TABLE ', table_name, ' ENGINE=MYISAM;') as ExecuteTheseSQLCommands
FROM information_schema.tables WHERE table_schema = 'yourdatabasename'
ORDER BY table_name DESC;

To convert from MYISAM to INNODB (MYSQL)

SELECT CONCAT('ALTER TABLE ', table_name, ' ENGINE=INNODB;') as ExecuteTheseSQLCommands
FROM information_schema.tables WHERE table_schema = 'yourdatabasename'
ORDER BY table_name DESC;