The mysql database modifies the table engine

  • 2020-06-07 05:27:32
  • OfStack

For MySQL databases, you must use the INNODB engine if you want to use transactions and row-level locking. If you want to use a full-text index, you must use myisam. INNODB is more practical, secure, stable and less efficient than MYISAM, but has some features that MYISAM does not have. Modify MySQL engine to INNODB, can use foreign keys, transactions and other functions, high performance.

View the status of the table


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

Change the engine of the table


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


Related articles: