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.
    • Related Articles

    • Creating and Implementing Custom Sequences in MySQL 8

      In MySQL, a table-based sequence is used to generate a sequence of numbers, typically for auto-incrementing primary keys. However, unlike some other databases, MySQL does not have a built-in SEQUENCE object. Instead, you can simulate a sequence using ...
    • How MySQL Wait Events influence Performance?

      MySQL Wait Events, particularly when monitored through the Performance Schema, are vital indicators that can significantly impact database performance. Understanding and analyzing these wait events can offer valuable insights into how MySQL utilizes ...
    • How resource limitations impacts on MySQL performance?

      Resource limitations can have a significant impact on MySQL performance. When MySQL lacks the necessary resources to operate efficiently, various aspects of database performance can be negatively affected. Here's a detailed look at how constraints on ...
    • Troubleshooting signal waits happening to MySQL

      Signal waits in MySQL generally refer to situations where threads are waiting for signals (or notifications) from other threads to proceed with their operation. These kinds of waits are often related to thread synchronization and can be indicative of ...
    • Effective Annotating of Strace Output for MySQL Performance Troubleshooting

      What is Linux Process Snapper? Linux Process Snapper, commonly known as strace, is a powerful command-line tool used for tracing and debugging processes on a Linux-based system. It enables the monitoring and capturing of system calls made by a ...