Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

try to change bin log directory: mysql-bin.index not found (Errcode: 13)

Tags:

logging

mysql

bin

MySQL 5.1.54 Ubuntu 11.04

I'am try to change bin log directory in my.conf as:

[mysqld] log_bin=/home/developer/logs/mysql/mysql-bin.log 

After this changes MySQL server can't start with error:

/usr/sbin/mysqld: File '/home/developer/logs/mysql/mysql-bin.index'  not found (Errcode: 13) 111005 12:47:58 [ERROR] Aborting 

Permission for directory /home/developer/logs/mysql/ is 0777

What's going on?

like image 588
solo117 Avatar asked Oct 05 '11 11:10

solo117


People also ask

Where are MySQL bin logs stored?

The MySQL binary logs and index files are saved in the C:\ProgramData\MySQL\MySQL Server 8.0 directory. We can change the default location of the binary logs.

What is bin log in MySQL?

The binary log is a set of log files that contain information about data modifications made to a MySQL server instance. The log is enabled by starting the server with the --log-bin option. The binary log was introduced in MySQL 3.23. 14.

How do I disable binary logging in MySQL?

To disable binary logging, you can specify the --skip-log-bin or --disable-log-bin option at startup. If either of these options is specified and --log-bin is also specified, the option specified later takes precedence.


1 Answers

As usual, the solution was simple but not obvious: it needed to edit apparmor settings I just added to /etc/apparmor.d/usr.sbin.mysqld a new string with path to target directory: /home/developer/logs/* rw

It works!

like image 161
solo117 Avatar answered Sep 27 '22 21:09

solo117