MySQL store current binary log in different folder from past binary logs` Is there any way to do this? Specify a different directory for currently active binary log.

(It would nice if possible, because then we could store past binary logs in a compressed file system without compromising write performance of the current log.)
Why?  Replication was not designed with the thought of keeping binlogs for very long.  Very few systems ask to keep them longer than 2 weeks.  To use very old logs is costly due to the effort to rebuild the system and replay the logs.  It is usually better to periodically take some form of snapshot.

That being said, I will get back to your Question.  How about the following...  You write a shell script that runs daily and does:


If less than X GB of data in uncompressed binlogs, exit silently.
Copy the oldest binlog to the compressed filesystem.
Replace that binlog with a soft link to the copy.


Meanwhile, set up MySQL to never purge binlogs, and add something to your script to do the equivalent purging.  (I think there are some edge cases that will go haywire otherwise.)

Any reference from MySQL to the compressed binlogs should work fine; however there won't be any (unless a Slave is more than X GB behind).