Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-13-2012, 03:29 PM   #1
LQ Newbie
Registered: Jun 2012
Posts: 1

Rep: Reputation: Disabled
MYD and MYI files in linux server taking 48GB space

Hi Everyone...

I am new to Linux environment. In my linux server I have 48GB data of MYD and MYI formate file. I am aware of this files belongs to mysql tables. I don't why this files took this much space(48GB). I have took my database backup its only 168MB.. help me please
Old 06-14-2012, 08:25 PM   #2
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,329

Rep: Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745
There are (at least) 3 options & it may be a combination thereof

1. a lot of data has been deleted from the DB.
DBs do NOT auto-shrink, but they often auto-extend

2. the DB was heavily fragmented;
given the numbers above, may be part of the problem

3. if you are using fixed length fields eg CHAR instead of VARCHAR, I think the DB always creates them as full length inside the DB, due to the matching algorithms used, but its possible that mysqldump only extracts the actual data ie without the trailing spaces/blanks.

The easiest way to test is to grab a spare system from somewhere and reload the dump.
If DB stays small, its options 1 & possibly 2
If DB inflates again, its option 3.

You should have a good read over at MySQL
Old 06-14-2012, 08:35 PM   #3
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,086
Blog Entries: 28

Rep: Reputation: 6087Reputation: 6087Reputation: 6087Reputation: 6087Reputation: 6087Reputation: 6087Reputation: 6087Reputation: 6087Reputation: 6087Reputation: 6087Reputation: 6087
I am assuming that there's just the one database.

This is just a shot in the dark and I am not a DBA by any means, but you have done a database check, repair, and optimize? If so, what was the result.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] mysql .MYD .MYI are missing ilvista Linux - Newbie 4 04-06-2011 04:07 AM
mysql MyISAM table doesn't have .MYD and MYI files. celeron Linux - Server 2 02-01-2011 08:35 AM
Deleted files taking up space airwolf2 Linux - Newbie 2 12-09-2007 03:42 PM
Application to convert MySQL files MYD, MYI, FRM to SQL text files ? SethShannon Linux - Newbie 1 09-28-2007 07:03 PM
Program that determines which files/directories are taking up the most space kaplan71 Linux - Software 1 02-09-2006 08:21 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:45 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration