Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Mar 15, 2012 12:22 pm 
Offline
Senior Newbie

Joined: Thu Dec 01, 2011 8:20 pm
Posts: 7
Hi!

Today mysql was working bad, looking at the errorlog I realized that the disk was full.... then I see 12gb of binary logs... (some of them from 4 months ago?)

It is a regular mysql, no slave, no replication, etc... just a regular mysql with 3 databases at the moment...

The question is... How many days we need to keep those binary log files? Why are not purged? Do I need to configure something to achieve that?

Best regards!
luciano


Top
   
 Post subject:
PostPosted: Thu Mar 15, 2012 1:03 pm 
Offline
Junior Member

Joined: Sat Feb 18, 2012 12:26 pm
Posts: 24
Are you backing up the database? Binary logs also serve to keep a record of what's changed since the last backup so you can do a point in time recovery between backups.

mysqldump can be called to backup the db with options --flush-logs and --delete-master-logs so it prunes back the logs.

If you don't need that, turn the binary logging off in the cnf file by commenting out the log_bin setting


Top
   
 Post subject:
PostPosted: Thu Mar 15, 2012 1:06 pm 
Offline
Senior Newbie

Joined: Thu Dec 01, 2011 8:20 pm
Posts: 7
Thanks for the advices vickd!

Will do the backup thing I guess! it was a thing to do... it is time now :)


Top
   
 Post subject:
PostPosted: Fri Mar 16, 2012 3:45 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
You can also set up expire_logs_days to clean out logs for you
http://dev.mysql.com/doc/refman/5.0/en/ ... _logs_days

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group