Issuing a 'reset master' will purge all of the logs as well. I wouldn't just rm them, as they are being tracked in the index file.
If you aren't running a slave, then these files are only good for data recovery purposes. Say a DBA goes crazy and deletes all of the databases mid-day (too much stress). You could restore the previous nights backup and run these bin logs up to the point of the delete command - a little bit of editing would be needed to do this, but you get the idea. For this to work smoothly, you need to reset the logs after every backup. If your using mysqldump, just add the --delete-master-logs option. If you want to turn the logs off, remove log-bin and log-bin-index from the conf file. Regards, Scott Tanner On Thu, 2007-04-26 at 09:47 -0700, Scott Haneda wrote: > > In the short term, see the manual page for PURGE MASTER LOGS. In the > > long term, write a cron job. > > > > innotop (http://sourceforge.net/projects/innotop) also has a new > > feature, unreleased because I just wrote it a few hours ago, which will > > help you figure out which binlogs can be purged s> keystroke > > :-)--delete-master-logs > > I don't quite get this, if SHOW SLAVE STATUS shows empty result set, and I > am just running one server, not a master + slave setup at all, its really > rather simple. > > So, how would I ever know what logs I can safely delete or purge? > > Do I really need to use mysql to purge them or can I just `rm` them? > > I guess I could push this to cron? > PURGE MASTER LOGS BEFORE DATE_SUB( NOW( ), INTERVAL 31 DAY); > > My question is, what are these logs really good for, I assume restoration, > and from what I read, but how do I know how far back I should keep? > > thanks > -- > ------------------------------------------------------------- > Scott Haneda Tel: 415.898.2602 > <http://www.newgeo.com> Novato, CA U.S.A. > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]