List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:July 1 2006 5:15pm
Subject:Re: what are those MySQL files for?
View as plain text  
In the last episode (Jul 01), Douglas Sims said:
> On Jun 30, 2006, at 11:47 PM, Octavian Rasnita wrote:
> >In the /data/database_name directory I have found a few files I
> >don't know what they are used for. I have seen that some of them are
> >pretty big. I don't think it is safe to delete them, but can I do
> >something to decrease their size at least?
> >
> >Here are those files and their sizes in MB:
> >
> >1 #sql-2a91_cdf.frm
> >397 #sql-2a91_cdf.MYD
> >253 #sql-2a91_cdf.MYI
> >1 #sql-6094_2.frm
> >397 #sql-6094_2.MYD
> >1 #sql-6094_2.MYI
> >2 #sql-6094_2.TMD
> Those are the files which contain the data in each table in your
> MySQL databases.  I think the .myd files contain the data, the .myi
> files contain indexes, and the .frm files contain schema information.

In general, yes, files ending in .MY? are database files.  These
particular files are actually temporary database files (because they
start with "#sql-").  They're created when you run an ALTER TABLE
command and are deleted when the procedure finishes.  If you run SHOW
PROCESSLIST and don't see any active queries, then those files were
probably left over from a system crash and can be deleted.

	Dan Nelson
what are those MySQL files for?Octavian Rasnita1 Jul
  • Re: what are those MySQL files for?Douglas Sims1 Jul
    • Re: what are those MySQL files for?Dan Nelson1 Jul