文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>myisam引擎自动转换为innodb引擎脚本

myisam引擎自动转换为innodb引擎脚本

时间:2010-08-10  来源:huangxifeng607

#!/bin/bash
#creator:hxf
#
if [ -z $1 ]
then
  echo "usage:`basename $0` mysql dbname";
  exit 14;
fi
mbin=${mbin:-/usr/bin/mysql};
db=$1;
rm -f /tmp/convert_engine.tmp;
# mbin=/usr/bin/mysql
 $mbin -e "select concat('alter table "$db".',table_name,' engine=innodb;') from information_schema.tables where TABLE_SCHEMA='"$db"' and engine='MYISAM' into outfile '/tmp/convert_engine.tmp'";
 $mbin < /tmp/convert_engine.tmp;
相关阅读 更多 +
排行榜 更多 +
无畏行者模拟器

无畏行者模拟器

冒险解谜 下载
哈基米世界

哈基米世界

休闲益智 下载
哈基米世界(内置菜单)

哈基米世界(内置菜单)

休闲益智 下载