Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » SMS User Support

Post new topic   Reply to topic
mysql-bin log files
View previous topic :: View next topic  
Author Message
baboo
Senior Member


Joined: 04 Sep 2007
Posts: 676

PostPosted: Wed May 23, 2012 4:06 pm    Post subject: mysql-bin log files Reply with quote

The mysql-bin log files are taking up alot of disk space. I tried to purge the files with mysql statement 'purge binary logs' but nothing happens. The 'show variables' reveals the bin log compiled in. So, I am stumped why I can not purge them.

Do you have a recommended way of dealing with these files?

thanks
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Wed May 23, 2012 6:27 pm    Post subject: Reply with quote

The right syntax would be
purge binary logs to 'logname';
logname up to e.g. if you want to delete first 100 binary logs
purge binary logs to 'mysql-bin.000100';

or

purge binary logs before 'datetime expr';

More info at
http://dev.mysql.com/doc/refman/5.1/en/purge-binary-logs.html


gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
baboo
Senior Member


Joined: 04 Sep 2007
Posts: 676

PostPosted: Wed May 23, 2012 7:01 pm    Post subject: Reply with quote

my fault. I should have been clear. I tried those statements. Stop mysql and restart but it does not purge the files.

Mysql docs say you can delete them if you are not doing replication. Maybe that is the way to go.

thanks
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Wed May 23, 2012 8:23 pm    Post subject: Reply with quote

If you are running an innodb database you might corrupt the database if you delete them manually.

You don't have to stop mysql, mysql should be running.

What's the output of
ls -lh /var/lib/mysql/mysql-bin.*

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
baboo
Senior Member


Joined: 04 Sep 2007
Posts: 676

PostPosted: Thu May 24, 2012 9:05 pm    Post subject: Reply with quote

thanks for the input. I've taken care of it.

thanks
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Thu May 24, 2012 9:10 pm    Post subject: Reply with quote

Just for the information, did you do something else, or the above command fix it?

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
baboo
Senior Member


Joined: 04 Sep 2007
Posts: 676

PostPosted: Thu May 24, 2012 9:38 pm    Post subject: Reply with quote

I read the manual at mysql and ended up deleting it. All is okay. I do daily dumps of databases and the manual said it would work as long as I wasn't doing replication.

thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » SMS User Support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional