开发者

MySQL log files deletion

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 开发者_StackOverflow中文版the log files have been deleted ?? If yes, what is the way to do it ?

Any help would be appreciated.

Thanks


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.


This MySql documentation has all the information beautifully laid out

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜