I have a mysql server with 5.5. I tried to enable the binlog using the below config file.

server_id                      = 1
log_bin                        = /mysql/binlog/mysql_bin
expire_logs_days               = 14
sync_binlog                    = 1
max_binlog_size                = 100M

/mysql/binlog/ is owned by mysql:mysql

After restart mysql I got the below error.

mysqld: File '/mysql/binlog/mysql-bin.index' not found (Errcode: 13)

So I tried this command.

added this to my.cnf

binlog_do_db                   = mydb    
log_bin_index                  = /mysql/binlog/mysql-bin.index

And executed this commands.

touch /mysql/binlog/mysql-bin.index
chown mysql:mysql /mysql/binlog/mysql-bin.index

But still its throwing the same error.


Please never mind, I found a solution on this blog.

Still the mysql data directory points to /var/lib/mysql


Then did chmod 700 binlog.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.