Home>Article>Database> How to query storage engine with mysql

How to query storage engine with mysql

青灯夜游
青灯夜游 Original
2022-06-16 16:23:52 7785browse

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.

How to query storage engine with mysql

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

How to query storage engine with mysql

Supportcolumn value representation Whether a certain engine can be used,YESmeans it can be used,NOmeans it cannot be used,DEFAULTmeans 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%';

How to query storage engine with mysql

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

How to query storage engine with mysql

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!

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