Two query methods: 1. Use the "SHOW ENGINES;" statement to display the engine types supported by the system in table form. The value of the "Support" column indicates whether a certain engine can be used. "YES " means it can be used, "NO" means it cannot be used, and "DEFAULT" means the engine is the current default engine. 2. Use the "SHOW VARIABLES LIKE 'default_storage_engine%';" command to view the system's default storage engine.
The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.
Two methods for mysql query storage engine
1. Check the engine type supported by the system
SHOW ENGINES;
The statement can display the engine types supported by the system in table form
Support
column value representation Whether a certain engine can be used,YES
means it can be used,NO
means it cannot be used,DEFAULT
means the engine is the current default storage engine.
2. View the default storage engine
You can view the default storage engine by executing the following statement
SHOW VARIABLES LIKE 'default_storage_engine%';
The execution results show that the InnoDB storage engine is the default storage engine.
Extended knowledge: Modify the temporary default storage engine of the database
Use the following statement to modify the temporary default storage engine of the database:
SET default_storage_engine=< 存储引擎名 >
For example, change the temporary default storage engine of the MySQL database to MyISAM
At this time, you can find that the default storage engine of MySQL has become MyISAM. But when the client is restarted again, the default storage engine is still InnoDB.
[Related recommendations:mysql video tutorial]
The above is the detailed content of How to query storage engine with mysql. For more information, please follow other related articles on the PHP Chinese website!