Converting MySQL MyISAM tables to InnoDB

It’s a one-liner:

for t in \
$(mysql -u your_username \
-pyour_password \
--batch --column-names=false \
-e "show tables" your_database) ; \
do \
mysql -u your_username \
-pyour_password \
-e "alter table $t type=InnoDB" your_database; \
done