Home > Database > Mysql Tutorial > How to query storage engine with mysql

How to query storage engine with mysql

青灯夜游
Release: 2022-06-16 16:23:52
Original
7914 people have browsed it

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

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%';
Copy after login

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=< 存储引擎名 >
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template