In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to understand the innodb_file_per_table parameter in MySQL. The content of the article is of high quality, so Xiaobian shares it with you for reference. I hope you have a certain understanding of relevant knowledge after reading this article.
When creating a table in MySQL, if innodb_file_per_table is ON, two files tablename.frm and tablename.ibd are generated.
If innodb_file_per_table is OFF, only one file tablename.frm will be generated, and the data of this table will be stored in the file ibdata*.
mysql> show variables like '%per_table%';
+---------------------------+-------+
| Variable_name | Value|
+---------------------------+-------+
| innodb_file_per_table | ON |
+---------------------------+-------+
mysql> use vast
mysql> create table testtbs(a int,b int);
mysql> insert into testtbs select 1,2;
mysql> insert into testtbs select 3,4;
[root@vast vast]# pwd
/data/mydb/vast
[root@vast vast]# ls *testtbs*
testtbs.frm testtbs.ibd
mysql> show variables like '%per_table%';
+---------------------------+-------+
| Variable_name | Value|
+---------------------------+-------+
| innodb_file_per_table | OFF |
+---------------------------+-------+
mysql> create table testtbs1(a int,b int);
mysql> insert into testtbs1 select 1,2;
mysql> insert into testtbs1 select 3,4;
[root@vast vast]# pwd
/data/mydb/vast
[root@vast vast]# ls *testtbs1*
testtbs1.frm
About how to understand MySQL innodb_file_per_table parameter to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.