Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I want to change the default name of binary log and path. I saw the documentation where it discusses about base_name. However, I just need to confirm how to use it correctly. I want binary logs to be stored on another partition and also want to schedule binary logging to run at regular intervals in a day.

I am using MySQL 5.5.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

You should be able to set the binary logs to a new partition by providing the absolute path:

log-bin=/my/other/dir/mysql-bin

You might need to copy the old binary logs to the new directory and update the .index file with the new path information (Do this only when mysql is not running).

Why would you only want to binary log during certain intervals of the day? Doing this could really mess with your ability to restore at any given time.

share|improve this answer
    
This is a thorough +2 (I can only give +1) especially on the part of editing of the mysql-bin.index file. @RPK, instead of binary logging at certain parts of the day, you may want to do FLUSH LOGS every hour and set expire_logs_days to 7 in /etc/my.cnf to control growing binary logs in the face of a heavy write environment. –  RolandoMySQLDBA Aug 4 '11 at 18:32
    
At present I am not using Binary Logging. As suggested by you, I am going to add line: MySQLd log-bin in my.ini file (I am using Windows 7). How to update the index? –  RPK Aug 5 '11 at 5:51
    
@RPK if you weren't using binary logging previously you can skip that. –  Derek Downey Aug 5 '11 at 13:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.