How to Enable MySQL Binary Log

To enable MySQL binary log you need to alter the mysql configuration file "my.cnf". The file os located on Linux systems at /etc/my.cnf. So just add the following line to you conf file. "log-bin=mysql-bin" under the [mysqld] section:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks <<
symbolic-links=0

#enable bin-log <<
log-bin=mysql-bin
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
The binary log contains “events” that describe database changes such as table creation operations or changes to table data. It also contains events for statements that potentially could have made changes (for example, a DELETE which matched no rows). The binary log also contains information about how long each statement took that updated data. The binary log has two important purposes: replication and recovery.