Home  >  Article  >  Database  >  查看和修改MySQL数据库表存储引擎_MySQL

查看和修改MySQL数据库表存储引擎_MySQL

PHP中文网
PHP中文网Original
2016-05-27 13:45:151348browse

要做一名合格的程序员,除了把代码写的漂亮外,熟知数据库方面的知识也是不可或缺的,下面总结一下如何查看和修改MySQL数据库表存储引擎:
1、查看数据库所能支持的存储引擎:show engines;
2、查看某个数据库中某个表所使用的存储引擎:show table status from db_name where name='table_name';(注:将where条件去掉后可以查看某个数据库中所有表的存储引擎情况)
3、修改表引擎方法:alter table table_name engine=innodb;
4、关闭Innodb引擎方法:通过“net stop mysql”命令关闭mysql服务;找到mysql安装目录下的my.ini文件,将里面default-storage-engine=INNODB改为default-storage-engine=MYISAM,将#skip-innodb改为skip-innodb;最后通过“net start mysql”命令启动mysql服务。   

以上就是查看和修改MySQL数据库表存储引擎_MySQL的内容,更多相关内容请关注PHP中文网(m.sbmmt.com)! 

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