Friday, January 30, 2009

mysql convert all tables from myisam to innodb

for x in $(echo "show tables;"| mysql --user=fartman --password=beer --host=10.11.12.13 --database=pet|grep -v Tables_in); do echo "alter table $x engine = innodb;" | mysql --user=fartman --password=beer --host=10.11.12.13 --database=pet;done

or:
http://www.linux.com/articles/46370

No comments: