How to know if MySQL binary log is enabled through SQL command?

MySQLMySQLi Database

to know if MySQL binary log is enabled through SQL command, you can use show variables command.

The syntax is as follows

show variables like ‘yourPatternValue’;

In place of ‘yourPatternValue’, you can use log_bin to check the binary log is enabled using SQL command show.

The query is as follows

mysql> show variables like 'log_bin';

The following is the output that displays whether it is enabled or not

+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_bin       | ON    |
+---------------+-------+
1 row in set (0.03 sec)
raja
Published on 16-Jan-2019 12:13:01
Advertisements