I posted a note to your page. You can do that script in 1 query.
SELECT
CONCAT('ALTER TABLE ', information_schema.TABLES.TABLE_SCHEMA, '.', information_schema.TABLES.TABLE_NAME, ' ENGINE = InnoDB;') AS alter_engine,
CONCAT('ALTER TABLE ', information_schema.TABLES.TABLE_SCHEMA, '.', information_schema.TABLES.TABLE_NAME, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') AS alter_char
FROM information_schema.TABLES
WHERE
information_schema.TABLES.TABLE_SCHEMA = ''
AND (
information_schema.TABLES.ENGINE != 'InnoDB'
OR information_schema.TABLES.TABLE_COLLATION != 'utf8_general_ci'
)
ORDER BY
information_schema.TABLES.TABLE_SCHEMA
;