Home  >  Article  >  Database  >  How to query the storage engine of mysql

How to query the storage engine of mysql

青灯夜游
青灯夜游Original
2022-02-21 15:01:009904browse

Query method: 1. Open the cmd command window; 2. Execute the "mysql -h localhost -u username -p" command to log in to the mysql database; 3. Execute "show variables like '%storage_engine%';" command to view the storage engine.

How to query the storage engine of mysql

The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.

When we use the MYSQL database, sometimes we need to know the default database engine and supported storage engines of mysql data before we can choose the appropriate storage engine.

Let’s take a look at how to view the MySQL storage engine.

1. Open the cmd command window and log in to the mysql database

Use the command "mysql -h localhost (mysql address) -u username -p"

How to query the storage engine of mysql

Enter "show engines;" If you can't see clearly, you can enter "show engines \G", You can clearly see the storage engine supported by MYSQL you installed.

How to query the storage engine of mysql

How to query the storage engine of mysql

support: The default option is the default storage engine of the MYSQL database, and other storage engines are what you can choose. As shown in the figure, InnoDB is the default storage engine

How to query the storage engine of mysql

How to query the storage engine of mysql

#2. You can use "show variables like 'storage_engine';" to view the database storage engine, but if the result returned by this command is empty, then you can also try this command "show variables like '%storage_engine%';"

How to query the storage engine of mysql

3. You can also use "use database name;" and then "show create table city (show);" or "show create table city (show) \G". As long as your database table has not modified the storage engine itself, then the table The default storage engine will be selected.

How to query the storage engine of mysql

How to query the storage engine of mysql

How to query the storage engine of mysql

[Related recommendations: mysql video tutorial]

The above is the detailed content of How to query the storage engine of 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