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.
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
"
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.
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
#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%';"
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.
[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!