Ajay Kadyan Ajay Kadyan - 3 months ago 36
MySQL Question

Binary log error in mysql

When I am trying to check binary log:


I get this error:

ERROR 1381 (HY000): You are not using binary logging.

How to resolve this? Can anybody help?


Set the log-bin variable in your MySQL configuration file, then restart MySQL.

An example my.cnf (on Linux/unix) or my.ini (on Windows) would look like:



Once restarted, MySQL automatically creates a new binary log (does so upon every restart). You may also wish to look at the following variables:

server-id        = 1
expire_logs_days = 4
sync_binlog      = 1

Read details on the MySQL documentation. If you're after replication setup (a primary reason for using binary logs), check out Replication configuration checklist.