Correct way to start new .MYD .MYI files
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
Re: Correct way to start new .MYD .MYI files
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=mdyk...@gmail.com -- - michael dykman - mdyk...@gmail.com Don't worry about people stealing your ideas. If they're any good, you'll have to ram them down their throats! Howard Aiken -- - michael dykman - mdyk...@gmail.com Don’t worry about people stealing your ideas. If they’re any good, you’ll 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=arch...@jab.org
Re: Correct way to start new .MYD .MYI files
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 Canuckmah...@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, Kevenkeven.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. USEwhateverdatabasethisisin; 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, Kevenkeven.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
Re: Correct way to start new .MYD .MYI files
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 euge...@ix.netcom.com 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 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, Kevenkeven.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. USEwhateverdatabasethisisin; 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, Kevenkeven.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=mdyk...@gmail.com -- - michael dykman - mdyk...@gmail.com Don’t worry about people stealing your ideas. If they’re any good, you’ll 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=arch...@jab.org
Re: Correct way to start new .MYD .MYI files
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 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=jlyons4...@gmail.com -- Jim Lyons Web developer / Database administrator http://www.weblyons.com