Correct way to start new .MYD & .MYI files

Correct way to start new .MYD & .MYI files

am 25.09.2009 21:33:35 von keven.jones

Hello,

I am new to MySQL.I have a disk space issue and I have found that 3 files a=
re 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 al=
low 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=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Correct way to start new .MYD & .MYI files

am 25.09.2009 22:04:15 von Michael Dykman

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 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 s=
tructure.
>
> So is there a way to just clear out the ApplicationLog.MYD and Applicatio=
nLog.MYI files?
>
> Thx again
>
> -----Original Message-----
> From: Michael Dykman [mailto:mdykman@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 ;
> 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 t=
hose tables... =A0now that they are gone, that application might begin to f=
ail. =A0Be prepared to create a new empty table with that name
> having the same structure,... =A0 if you really don't want the data but
> are only doing it to make your app happy, consider the black-hole databas=
e engine.
>
> =A0- michael dykman
>
>
>
> On Fri, Sep 25, 2009 at 3:33 PM, Jones, Keven wrote=
:
>> Hello,
>>
>> I am new to MySQL.I have a disk space issue and I have found that 3 file=
s 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 fi=
les 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=3Dmdykman@gmail.com
>>
>>
>
>
>
> --
> =A0- michael dykman
> =A0- mdykman@gmail.com
>
> Don't worry about people stealing your ideas. If they're any good, you'll=
have to ram them down their throats!
>
> =A0 Howard Aiken
>



--=20
- michael dykman
- mdykman@gmail.com

Don=92t worry about people stealing your ideas. If they=92re any good,
you=92ll have to ram them down their throats!

Howard Aiken

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Correct way to start new .MYD & .MYI files

am 25.09.2009 22:16:59 von Eugene Mah

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 eugenem@ix.netcom.com
Medical Physicist/Misplaced Canuck maheug@musc.edu
Department of Radiology eugenemah@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 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:mdykman@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;
>> 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 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=gcdmg-mysql-2@m.gmane.org

Re: Correct way to start new .MYD & .MYI files

am 25.09.2009 22:59:00 von Michael Dykman

Eugene,

Right you are. I don't know why I thought he had corrupted tables to
start with but that was the assumption I was under. A simple TRUNCATE
is the easiest way to deal with this..

- michael


On Fri, Sep 25, 2009 at 4:16 PM, Eugene Mah wrote:
> 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 =A0 =A0 =A0 =A0 =A0 =A0 =A0 eugenem@ix.netcom.com
> Medical Physicist/Misplaced Canuck =A0 =A0maheug@musc.edu
> Department of Radiology =A0 =A0 =A0 =A0 =A0 =A0 =A0 eugenemah@gmail.com
> Medical University of South Carolina =A0"For I am a Bear of Very Little
> Charleston, South Carolina =A0 =A0 =A0 =A0 =A0 =A0 Brain, and long words =
Bother
> http://www.netcom.com/~eugenem/ =A0 =A0 =A0 =A0me." =A0 Winnie the Pooh
> http://blog.imabug.net/
> PGP KeyID =3D 0x1F9779FD, 0x319393F4
> PGP keys available on request =A0 =A0 =A0 =A0 ICQ 3113529 =A0 =A0 =A0 =A0=
=A0 =A0 =A0 =A0 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*.
>>
>> =A0- michael
>>
>> On Fri, Sep 25, 2009 at 3:47 PM, Jones, Keven =A0wr=
ote:
>>>
>>> I don't want to lose the table structure just wish to get rid of the ol=
d
>>> 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:mdykman@gmail.com]
>>> Sent: Friday, September 25, 2009 3:42 PM
>>> To: Jones, Keven
>>> Subject: Re: Correct way to start new .MYD& =A0.MYI files
>>>
>>> If you are prepared to accept that any data associated with those table=
s
>>> is *LOST*, it's pretty simple.
>>>
>>> First try, the nice way.
>>>
>>> USE;
>>> DROP TABLE ApplicationLog;
>>>
>>> If this fails, complains about curruption, whatever, go to the next ste=
p
>>> 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... =A0now that they are gone, that application might begin=
to
>>> fail. =A0Be prepared to create a new empty table with that name
>>> having the same structure,... =A0 if you really don't want the data but
>>> are only doing it to make your app happy, consider the black-hole
>>> database engine.
>>>
>>> =A0- michael dykman
>>>
>>>
>>>
>>> On Fri, Sep 25, 2009 at 3:33 PM, Jones, Keven
>>> =A0wrote:
>>>>
>>>> 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: =A0 =A0http://lists.mysql.com/mysql?unsub=3Dmdykman@gmail=
..com
>
>



--=20
- michael dykman
- mdykman@gmail.com

Don=92t worry about people stealing your ideas. If they=92re any good,
you=92ll have to ram them down their throats!

Howard Aiken

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Correct way to start new .MYD & .MYI files

am 25.09.2009 23:17:53 von Jim Lyons

--0016e6d77e322d50cc04746d7b07
Content-Type: text/plain; charset=ISO-8859-1

Run mysqldump on the table ApplicationLog and save that somewhere where
there's space, then truncate the table.

If you would really like to keep the tables but only have a disk space
issue, then there is one thing you can do if you have disk space on another
file system. Move the 3 files for ApplicationLog and create sym links for
them. In Unix/Linux, you would use the ln command. I believe Windows has a
way of creating symlinks with .sym files, but I'm not 100% sure.


On Fri, Sep 25, 2009 at 2:33 PM, Jones, Keven 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=jlyons4435@gmail.com
>
>


--
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com

--0016e6d77e322d50cc04746d7b07--