Pages

Wednesday, August 25, 2010

MYSQL: Enable BINARY Logging using my.cnf config

MYSQL: Enable BINARY Logging using my.cnf config

Below are the parameters to enable binary logs - Make sure the changes are done based on hardware configurations and RAM.

Mention binary logs with respect to databases using - "binlog_do_db" parameter


Binary file will automatically flush logs to new file base the system configuration settings and also we can flush logs by automating using shell script by setting cron-job feature.

If you want use MySQL options - MySQL Configuration has in-built to limit binary file size using - "max_binlog_size" parameter



# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
log_bin = /usr/local/mysql/logfiles/XXXXXX_index.log
binlog_format=ROW
#log-slave-updates

#max_binlog_size = 100M
binlog_do_db = db1
binlog_do_db = db2
binlog_do_db = db3
binlog_do_db = db4
binlog_do_db = db5
#binlog_ignore_db = include_database_name


Cheers!!!!

1 comment:

puiu valentin said...

what i need to change to work for me?
thx