TRUNCATE?

http://dev.mysql.com/doc/refman/5.0/en/truncate.html

DELETE?

http://dev.mysql.com/doc/refman/5.0/en/delete.html

eugene

---------------------------------------------------------------------
Eugene Mah, M.Sc., DABR               euge...@ix.netcom.com
Medical Physicist/Misplaced Canuck    mah...@musc.edu
Department of Radiology               eugene...@gmail.com
Medical University of South Carolina  "For I am a Bear of Very Little
Charleston, South Carolina             Brain, and long words Bother
http://www.netcom.com/~eugenem/        me."   Winnie the Pooh
http://blog.imabug.net/
PGP KeyID = 0x1F9779FD, 0x319393F4
PGP keys available on request         ICQ 3113529                 O-
---------------------------------------------------------------------

On 09/25/2009 04:04 PM, Michael Dykman wrote:
Alas, none that I am aware of, but if you can successfully run 'SHOW
CREATE TABLE `ApplicationLog`' before you drop the table, it will give
you the DDL you need to recreate that table *exactly*.

  - michael

On Fri, Sep 25, 2009 at 3:47 PM, Jones, Keven<keven.jo...@ncr.com>  wrote:
I don't want to lose the table structure just wish to get rid of the old data 
in the .MYD and .MYI files.

If I drop the table I will need to recreate the table with the existing 
structure.

So is there a way to just clear out the ApplicationLog.MYD and 
ApplicationLog.MYI files?

Thx again

-----Original Message-----
From: Michael Dykman [mailto:mdyk...@gmail.com]
Sent: Friday, September 25, 2009 3:42 PM
To: Jones, Keven
Subject: Re: Correct way to start new .MYD&  .MYI files

If you are prepared to accept that any data associated with those tables is 
*LOST*, it's pretty simple.

First try, the nice way.

USE<whateverdatabasethisisin>;
DROP TABLE ApplicationLog;

If this fails, complains about curruption, whatever, go to the next step safely:

shutdown mysql (os-specific), then go ahead and delete those files.
Startup will happen normally and those tables will be gone.

Caution: you *might* be running an application that is expecting to use those 
tables...  now that they are gone, that application might begin to fail.  Be 
prepared to create a new empty table with that name
having the same structure,...   if you really don't want the data but
are only doing it to make your app happy, consider the black-hole database 
engine.

  - michael dykman



On Fri, Sep 25, 2009 at 3:33 PM, Jones, Keven<keven.jo...@ncr.com>  wrote:
Hello,

I am new to MySQL.I have a disk space issue and I have found that 3 files are 
the cause.

The files are ApplicationLog.MYD and ApplicationLog.MYI


I would like to purge these files and basically get rid of the data
that is in them. What is the proper Way to accomplish this? Does
anyone have a procedure to follow that will allow me to archive these files and 
Then start new ones so I can get my disk space back?

Thanks in advance.
--

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to