SELECT concat(‘alter table `’, TABLE_SCHEMA, ‘`.`’, TABLE_NAME, ‘` engine=innodb;’)
FROM information_schema.TABLES
WHERE ENGINE=‘Myisam’ AND
TABLE_SCHEMA‘’ AND
TABLE_SCHEMA‘information_schema’
INTO OUTFILE ‘/tmp/ivan_alter.sql’ ;
source /tmp/ivan_alter.sql
! rm -f /tmp/ivan_alter.sql
#执行完后删除临时文件
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn