Convert MyISAM to InnoDB in MySQL with this query from information_schema.tables:
Use this MySQL query to prepare the script:
SELECT CONCAT('ALTER TABLE ', table_name, '
ENGINE=InnoDB;') FROM information_schema.tables WHERE table_schema = 'ranger' AND ENGINE = 'MyISAM';
The output will contain a list of ALTER TABLE statements that you need to run in the MySQL terminal to change your MyISAM tables to InnoDB. Here's an example output:
ALTER TABLE vx_trx_log
ENGINE=InnoDB;
ALTER TABLE x_access_type_def
ENGINE=InnoDB;
ALTER TABLE x_access_type_def_grants
ENGINE=InnoDB;
...
ALTER TABLE xa_access_audit
ENGINE=InnoDB;
Follow these steps to convert your MyISAM tables to InnoDB and improve the performance and reliability of your MySQL database.
No comments:
Post a Comment