mysql表引擎由innodb批量转myisam方法

因为服务器上的mysql,不知道什么原因,无法设置存储引擎为innodb,所以需要改变某库的所有表的存储引擎为myisam。

select CONCAT('alter table ',table_name,' engine=InnoDB;') FROM information_schema.tables WHERE table_schema="tpmdb" AND ENGINE="InnoDB";

结果:

 将它们拷贝到记事本,然后再批量执行就行了。

---------------------------------------------------------------------------------------------------------------------------------------

有篇文章值得阅读:https://blog.csdn.net/hanghangaidoudou/article/details/83349340,讲的是如何优化mysql千万级count速度。

这篇也不错:https://blog.csdn.net/LJFPHP/article/details/84400400。

posted @ 2020-07-30 08:33  屌丝大叔的笔记  阅读(799)  评论(0编辑  收藏  举报