Loading...

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.

  1. On the computer where the MySQL server is installed, navigate to the location of the MySQL configuration file.

    For example: /etc/my.cnf

  2. Open the configuration file to edit it.
  3. In the [mysqld] section, add the following:

    log-bin=mysql-bin.log

  4. Restart the MySQL server for the changes to take effect.
  5. When the MySQL server is restarted, verify that binary logging is enabled by running the following query:

    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.

Last modified: 6/5/2019 6:15:22 AM