#!/bin/bash if [ $# -ne 1 ]; then echo “usage: convert.sh database” exit 1 fi date db=$1 echo “Convert database $db” ; mysql -B -N -e “SELECT TABLE_NAME, ENGINE FROM information_schema.TABLES where TABLE_SCHEMA = ‘$db’ and engine=’myisam'” |awk ‘{print $1}’| while read table; \ do \ echo “+ Converting Table $table”; \ mysql . . . → Read More: convert mysql table engine myisam to innodb
最新评论