批量修改數據庫表的存儲引擎類型的腳本 如下: Java代碼 tableList=`mysql football_log -e "show tables"` for tableName in ${tableList[*]} do case ${tableName} in Tables_in_football_log) echo "ignore Database:"${tableName} ;; *) echo "日志數據庫:"${tableName} mysql football_log -e "alter table "${tableName}" engine=innodb;" ;; esac done ~