[ 2015/03/08 10:31 | by 孤城浪子 ]
|
把所有INNODB表转换成MYISAM表的脚本
mysql -N -s information_schema -e "SELECT CONCAT('ALTER TABLE ',TABLE_NAME,' ENGINE=MYISAM;') FROM TABLES WHERE TABLE_SCHEMA='static' AND ENGINE='INNODB'" | mysql static
mysql -N -s information_schema -e "SELECT CONCAT('ALTER TABLE ',TABLE_NAME,' ENGINE=MYISAM;') FROM TABLES WHERE TABLE_SCHEMA='static' AND ENGINE='INNODB'" | mysql static