Home  >  Article  >  Database  >  mysql数据库修改数据表引擎的方法_MySQL

mysql数据库修改数据表引擎的方法_MySQL

WBOY
WBOYOriginal
2016-05-27 14:12:041090browse

bitsCN.com

对于MySQL数据库,如果你要使用事务以及行级锁就必须使用INNODB引擎。如果你要使用全文索引,那必须使用myisam。 INNODB的实用性,安全性,稳定性更高但是效率比MYISAM稍差,但是有的功能是MYISAM没有的。修改MySQL的引擎为INNODB,可以使用外键,事务等功能,性能高。

查看数据表的状态


SHOW TABLE STATUS FROM sites WHERE NAME='site'; 
SHOW TABLE STATUS FROM db_name WHERE NAME='table_name'; 
 

更改表的引擎


alter table table_name engine=innodb; 
alter table table_name engine=myisam; 

bitsCN.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