1

The files in which MySQL stores the table data don't seem to grow when I add data to the tables. They seem to start at 9k and stay there.

The context of this question is that I wanted to create a database on my fastest drive (which is not the drive on which MySQL is installed). I worked out how to do this by setting the datadir variable and this seems to have worked: when I create a new database I see a folder named for the database in datadir, and when I create a table in that database then the folder gets a new file called table.frm.

Is the .frm file not where MySQL stores the table's data? If 'no', then where is the data being stored? If 'yes' then why doesn't the file grow in size when I add millions of records to the table?

user1476044
  • 281
  • 1
  • 4
  • 13
  • What engine are you using for your tables, InnoDB? – drew010 Dec 06 '12 at 00:04
  • see http://stackoverflow.com/questions/484750/restoring-mysql-database-from-physical-files : frm contains the table definition, not the data – fvu Dec 06 '12 at 00:05
  • These two comments effectively solve my problem. It seems I am using InnoDB (whatever that is :-) and in that case the table data is not stored in datadir/database but directly in datadir as per fvu's link. Thanks people. – user1476044 Dec 06 '12 at 00:11

1 Answers1

1

the .frm is the table definition file, look for the .myd (data) and .myi (indexes) files

SQLMenace
  • 132,095
  • 25
  • 206
  • 225