How do I convert / change / delete more then one MySQL table?

Well, a quite simple task but still with a few dozen tables this might become quite some work in phpMyAdmin for example.

To solve this, we will use / write a simple bash script:

for t in $(mysql --batch --column-names=false -e "show tables" DBNAME);
mysql -e "alter table $t type=InnoDB" DBNAME;

That´s about it, you can replace the third line with other functions too, e.g.:
mysql -e "drop table $t" DBNAME

You cannot comment on this entry