tags:

views:

25

answers:

2

I have a master and slave database running on different nodes. The master DB is subjected to huge no. of inserts/updates. The master DB size is close to 6 GB, while the log files are now occupying a space of more than 120 GB. I am running out of disk space and need to get rid of the log files.

Will deleting the log files in anyway affect the slave DB ? Presently, the slave is just a couple of seconds behind the master.

Is there someplace where I can see what steps I need to follow to delete those files eg. 1)Shut down the slave 2)Shut down the master 3)Delete the log files 4)Start the Master 5)Start the Slave

Do I need to inform the slave that the log files have been deleted ?? If yes, what is the way to do it ?

Any help would be appreciated.

Thanks

+1  A: 

Yes, you can delete the OLD bin_log files. Make sure they're super old. Also, I would do mysql flush_logs

You should also set your config file to expire your log files after X days.

TIMEX
>>You should also set your config file to expire your log filesWhich is parameter I need to set in the my.cnf file for this ?? I tried googling it, but could not find. Can you point me to some document where I can find the details ?
aneez
Alex, I think I got it. http://dev.mysql.com/doc/refman/4.1/en/server-system-variables.html#sysvar_expire_logs_daysThanks
aneez
A: 

This MySql documentation has all the information beautifully laid out

http://dev.mysql.com/doc/refman/4.1/en/purge-binary-logs.html

aneez