Data File for InnoDB Storage Engine in MySQL


Where Table Data Is Stored by the InnoDB Storage Engine in MySQL?



By default, MySQL provides \mysql\data directory for all storage engines to store table data. Under \mysql\data directory, InnoDB storage engine will create 3 files to store and manage all tables that use the InnoDB storage engine:

  • ibdata1 - Contains data for all InnoDB tables. "ibdata1" starts with 10MB, but it will be extended, if needed.
  • ib_logfile0 - Log file 1 with 5MB.
  • ib_logfile1 - Log file 2 with 5MB.

If a new table is created with the InnoDB storage engine, one format file named as databaseName\tableName.frm will be created. Table data and index data will be stored in "ibdata1". For example, the new table "fyi_inno" created in the previous tutorial exercise will result the following files:

>cd \mysql\data

>dir fyi\fyi_inno.*
   8,620 fyi_inno.frm

   10,485,760 ibdata1
    5,242,880 ib_logfile0
    5,242,880 ib_logfile1


Storage Engines: MyISAM, InnoDB and BDB in MySQL

⇒⇒MySQL Database Tutorials

2017-08-13, 181👍, 0💬