Database Research & Development

  • Home
  • NoSQL
    • NoSQL
    • Cassandra
  • Databases
    • Database Theory
    • Database Designing
    • SQL Server Coding Standards
    • SQL Server
    • PostgreSQL
    • MySQL
    • Greenplum
    • Linux
  • Interviews
    • SQL Server Interviews
    • MySQL Interviews
    • SQL Puzzles
  • DBA Scripts
    • SQL Server DBA Scripts
    • PostgreSQL DBA Scripts
    • MySQL DBA Scripts
    • Greenplum DBA Scripts
  • Home
  • Blog Archives !
  • (: Laugh@dbrnd :)
  • Contact Me !
sqlserverinterviews
Home 2016 March MySQL: What is the main role of .frm file?

MySQL: What is the main role of .frm file?

This article is half-done without your Comment! *** Please share your thoughts via Comment ***

What is the role format file (.frm file) ?

FRM stands for FoRMat and it is storing data dictionary information for tables in .frm files. It describes the table’s format like table definition, including fields and structure. The name of this file is same as the table name.

Specially InnoDB engine stores encoded information about the table and managing its own data dictionary inside the tablespace.

When MySQL drops a table or a database, it also deletes .frm file which is associated with it.

We can also take backup of .frm file, restore the table definition from .frm file, can move .frm file from one storage to another storage.

The .frm file associated with a table that can be found in the directory that represents the database to which the table belongs.

You can check the MySQL data directory using below SHOW command.

1
SHOW VARIABLES LIKE 'datadir';

Important Note:
There is also one limitation of .frm file structure.
The portion of the information stored in the .frm file cannot grow beyond the 64KB limit, so if the table definition reaches this size, no more columns can be added.

Mar 26, 2016Anvesh Patel
PostgreSQL: Using json_agg() aggregate table data into a JSON formatted arraySQL Server: How to read database error log using T-SQL (xp_readerrorlog)
Comments: 5
  1. Harikrishna Guggilla
    March 26, 2016 at 8:11 pm

    Hi Bro,

    It is structure or description of table format or definition file for INNODB and MYISAM like “.frm” only or it is has to be for every engine i mean FEDERATED,MEMORY,CSV,BLACKHOLE,ARCHIVE and MERGE……?

    • Anvesh Patel
      Anvesh Patel
      March 27, 2016 at 4:13 am

      Yes, it is structure of Table and mostly used for all database engine.

  2. Ayusha
    September 24, 2019 at 6:45 am

    Hi
    How to restore mysql data from .frm and .idb files?

  3. Ayusha
    September 24, 2019 at 6:46 am

    Hi
    How to restore mysql data from .frm and .idb files?

  4. Ayusha
    September 24, 2019 at 12:42 pm

    Hi
    How to recover mysql data from .frm and .idb files?

Anvesh Patel
Anvesh Patel

Database Engineer

March 26, 2016 MySQL.frm, Anvesh Patel, database, database research and development, dbrnd, format file, MySQL, MySQL Command, MySQL Database Administrator, MySQL Database Designing, MySQL Database Programming, MySQL Error, MySQL Performance Tunning, MySQL Query, MySQL Tips and Tricks
About Me!

I'm Anvesh Patel, a Database Engineer certified by Oracle and IBM. I'm working as a Database Architect, Database Optimizer, Database Administrator, Database Developer. Providing the best articles and solutions for different problems in the best manner through my blogs is my passion. I have more than six years of experience with various RDBMS products like MSSQL Server, PostgreSQL, MySQL, Greenplum and currently learning and doing research on BIGData and NoSQL technology. -- Hyderabad, India.

About DBRND !

dbrnd

This is a personal blog (www.dbrnd.com).

Any views or opinions represented in this blog are personal and belong solely to the blog owner and do not represent those of people, institutions or organizations that the owner may or may not be associated with in professional or personal capacity, unless explicitly stated.

Feel free to challenge me, disagree with me, or tell me I’m completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or anonymous comments) - so keep it polite.

The content of this website is protected by copyright. No portion of this website may be copied or replicated in any form without the written consent of the website owner.

Recent Comments !
  • Anvesh Patel { Sure will do... } – May 27, 12:43 PM
  • Anvesh Patel { Great... } – May 27, 12:41 PM
  • Anvesh Patel { Great... } – May 27, 12:39 PM
  • Anvesh Patel { Great... } – May 27, 12:36 PM
  • Anvesh Patel { Great... } – May 27, 12:28 PM
  • Anvesh Patel { Great... } – May 27, 12:27 PM
  • Anvesh Patel { Great... } – May 27, 12:16 PM
  • Older »
Follow Me !
  • facebook
  • linkedin
  • twitter
  • youtube
  • google
  • flickr
© 2015 – 2019 All rights reserved. Database Research & Development (dbrnd.com)
Posting....