Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I check MySQL engine type for a specific table?

My MySQL database contains several tables using different storage engines (specifically myisam and innodb). How can I find out which tables are using which engine?

like image 642
oneself Avatar asked Oct 17 '08 19:10

oneself


People also ask

How do I know if my table is InnoDB or MyISAM?

SHOW TABLE STATUS from yourDatabaseName LIKE 'yourTableName'. The above syntax tells about the specific table engine. Now you can apply the above syntax to know whether the MySQL table engine is using MyISAM or InnoDB.

Which engine is used in MySQL?

InnoDB : The default storage engine in MySQL 8.0. InnoDB is a transaction-safe (ACID compliant) storage engine for MySQL that has commit, rollback, and crash-recovery capabilities to protect user data.

How do you check if MySQL table is InnoDB?

To determine whether your server supports InnoDB : Issue the SHOW ENGINES statement to view the available MySQL storage engines. mysql> SHOW ENGINES; Alternatively, query the INFORMATION_SCHEMA.

How do you change an engine in a table?

Access phpMyAdmin and select your database. Then click on SQL, place the following query and click on Go: ALTER TABLE my_table ENGINE = InnoDB; If the query is executed properly, the database engine of the table will be changed to InnoDB.


1 Answers

SHOW TABLE STATUS WHERE Name = 'xxx'

This will give you (among other things) an Engine column, which is what you want.

like image 197
Greg Avatar answered Oct 04 '22 03:10

Greg