I think I found where DBs are stored.
As I am working in XAMPP there were stored in /opt/lampp/var/mysql
there where folders for each database. When tried to open them it
gives me a error saying “you don't have permission” Next thing I
tried was trying to open it in the terminal using sudo. Unlucky me it
gave me a error saying “sudo: cd:
command not found”. Have to find a way to open such folders.
I'll write a post on this, If I find a way (Or any one who know a way
can help me by commenting below). Till then I used “sudo
nautilus path/”
There were 3 files for each table in
each db. A .frm file, .myd file, .myi file. All three are
contributing to the space used
- FRM files contain table structure information.
- MYD contains the actual table data.
- MYI files contain the indexes.
-s, --summarize (display only a total for each argument)
-h, --human-readable ( print sizes in human readable format (e.g., 1K 234M 2G))
so It showed that figures given in the information schema is similar to the results given by the above command. But size of the FRM file was not take in to account by me. But looks like all the .frm files are having the same length (12K) so I can sum them up If I know the number of tables. However I have to check why others ignore this file when they are calculating.
No comments:
Post a Comment