Enabling Binary Logging for MySQL

Enabling Binary Logging for MySQL

You must enable binary logging in order to perform transaction log backup. This is done in the MySQL configuration file.
On the computer where the MySQL server is installed, navigate to the location of the MySQL configuration file. 
For example: /etc/my.cnf
  1. Open the configuration file to edit it.
  2. In the [mysqld] section, add the following:
  1. log-bin=mysql-bin.log
  1. Restart the MySQL server for the changes to take effect.
  2. When the MySQL server is restarted, verify that binary logging is enabled by running the following query:
  1. mysql > show variables like “%log_bin%”
If binary logging has been enabled correctly, the value of log_bin = ON. If it has not be enabled correctly, the value of log_bin = OFF.