Will 2 steps suffice?
(1) Run the SELECT
against information_schema
, as seen in some of those links. But have it output 100 fully-formed ALTER
statements.
SELECT CONCAT("ALTER TABLE ", table_name, " ENGINE=InnoDB;
")
FROM information_schema.tables
WHERE engine='MyISAM'
AND table_schema='MyDatabase'
AND ...;
(2) Copy and paste the 100 lines into phpadmin. Go have a coffee. Or spend the time reading about the gotchas in converting to see if you will have some issues.
Doing them truly in parallel is unlikely to be any faster -- you will be I/O bound. And the small tables will finish fast, leaving the big tables to stretch out the time anyway.
Output sample:
SELECT CONCAT("ALTER TABLE ", table_name, " ENGINE=InnoDB;
")
FROM information_schema.tables
WHERE engine='MyISAM'
AND table_schema='test';
produces something like:
ALTER TABLE 07 ENGINE=InnoDB;\n
ALTER TABLE 597377b ENGINE=InnoDB;\n
ALTER TABLE adjprice ENGINE=InnoDB;\n
ALTER TABLE big ENGINE=InnoDB;\n
ALTER TABLE bigv ENGINE=InnoDB;\n
ALTER TABLE blobid ENGINE=InnoDB;\n
ALTER TABLE charlatin1 ENGINE=InnoDB;\n
ALTER TABLE collorder ENGINE=InnoDB;\n
ALTER TABLE collorder2 ENGINE=InnoDB;\n
ALTER TABLE countries ENGINE=InnoDB;\n
ALTER TABLE d1 ENGINE=InnoDB;\n
Then paste however many rows are generated back into the tool. No need to manually type the names.
If you first convert 100 tables, they will not be included when you run the query again. Only the new 25 will be included.
No, you cannot "automatically" change any new tables to a different engine. However...
By saying this in my.cnf
, you can have all new table for which you do not explicitly specify an ENGINE
be InnoDB:
[mysqld]
default_storage_engine = InnoDB