Binary log error in mysql – put your configs under [mysqld] not [mysqld_safe]- Stack Overflow

Visits: 794

When I am trying to check binary log:

 SHOW BINARY LOGS;

I get this error:

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

How to resolve this? Can anybody help?

Remove section [mysqld_safe] and replace with [mysqld]. It works for me.

I had placed new config data under mysqld_safe, which is wrong. I am making a Master Slave,

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# These are the lines that I added for replication.
server-id = 1
binlog-do-db=testDB
relay-log = /var/lib/mysql/mysql-relay-bin
relay-log-index = /var/lib/mysql/mysql-relay-bin.index
log-error = /var/lib/mysql/mysql.err
master-info-file = /var/lib/mysql/mysql-master.info
relay-log-info-file = /var/lib/mysql/mysql-relay-log.info
log-bin = /var/lib/mysql/mysql-bin

# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mysqld according to the
# instructions in http://fedoraproject.org/wiki/Systemd

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

 

 

Source: Binary log error in mysql – Stack Overflow

Leave a Reply