1 Viewing system-supported storage engines
Show engines;
2 Viewing the storage engine used by the table
Two methods:
A, Show table status from your_db_name where name= 'your_table_name';
b, show create TABLE your_table_name;
If the displayed format is not good-looking, you can use \g instead of the end of line semicolon
Some people say that using the second method is not accurate, I tried to shut down the original default InnoDB engine is not able to execute the show CREATE TABLE table_name instruction, because it was built InnoDB table, after the default with the MyISAM engine, Causes the InnoDB table data to not be read correctly.
The right way:
Show table status from Db_name where name= ' table_name ';
+------+--------+---------+------------+------+----------------+-------------+-----------------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length |
+---------+------------+------+----------------+-------------+-----------------+--------------+
| T | InnoDB | 10 | Compact | 3 | 5461 | 16384 | 0 |
+------+--------+---------+------------+------+----------------+-------------+-----------------+
Incorrect method:
Show CREATE TABLE table_name;
+-------+-----------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+-----------------------------------------------------------------------------------------+
| T | CREATE TABLE ' t ' (
' VC ' varchar (1) DEFAULT NULL,
' C ' char (1) DEFAULT NULL,
KEY ' C ' (' C ')
) Engine=innodb DEFAULT Charset=utf8 |
+-------+------------------------------------------------------------------------------------------+
If Mysqld does not start the corresponding engine as InnoDB here, then the default MyISAM engine will be used, so it is inaccurate.
3 Modifying the Table engine method
ALTER TABLE table_name ENGINE=INNODB;
4 shutting down the InnoDB engine method
Turn off MySQL service: net stop MySQL
Locate the My.ini file in the MySQL installation directory:
Find Default-storage-engine=innodb instead of Default-storage-engine=myisam
Find #skip-innodb instead of Skip-innodb
Start MySQL service: net start MySQL
MySQL View and modify table storage engine (reprint + add something)