#!/bin/bash
#
# Created by chentao
#
# To convert a table engine.
#
cd /usr/local/mysql/bin
echo 'Enter Database Name:'
read DBNAME
echo 'Enter Table Name:'
read TBNAME
echo 'Enter Table Engine:'
read TBTYPE
./mysql_convert_table_format --host=192.168.1.241 --user=root --password=root --socket=/tmp/mysql.sock --type=$TBTYPE $DBNAME $TBNAME --verbose
注释:
1,如果想全部修改不用输入表名。
2,mysql的INNODB引擎不支持全文索引,转换时可以先删除全文索引。