How to Enable Binary Logging for MySQL Server on Windows

To perform MySQL Server incremental backups, binary logs should be enabled and correctly set. Otherwise, you will see one of the following error messages:

Failed to backup “mysql” database with “Full” backup type: ​​​​​​​[DBMS-MYSQL:11015#1]​​​​​​​​​​ Unexpected binary log format. Current value: “MIXED”, expected value: “ROW”. Log in to the DBMS using the MySQL official client or other tools and run the statement to update the binary log format: set global binlog_format = ‘ROW’;

Failed to backup “mysql” database with “Incremental” backup type: ​​​​​​​​[DBMS-MYSQL:11014#1]​​​​​​​​ Binary log is not enabled. Current value of “log_bin” variable: “OFF”. Expected value: “ON”.

To enable the binary logs please follow these single steps:

  1. Find the file where my.ini settings are stored and make a backup copy of it (just in case)
  2. Open my.inifile and add the following text to the end
    expire_logs_days = 10
  3. Press win+r and execute services.msc
  4. Find MySQL56 (or something similar) in the list of services
  5. Right click > restart

That’s it! Now the binary logs are enabled, and MySQL incremental backups should run smoothly.

Leave a Reply

Your email address will not be published. Required fields are marked *