change all tables in all databases from myisam to innodb oneliner

17. 6. 2014 15:54 | Linux | Komentáře nejsou povolené u textu s názvem change all tables in all databases from myisam to innodb oneliner

for db in `echo "show databases" |mysql -BN|grep -v mysql`; do echo "SELECT CONCAT('USE $db; ALTER TABLE ',table_name,' engine=InnoDB;') FROM information_schema.tables WHERE engine = 'MyISAM' AND table_schema = '$db';" |mysql -BN; done |mysql

No Comments yet

Sorry, the comment form is closed at this time.

Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds. Valid XHTML and CSS. ^Top^