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

solo117 picture solo117 · Oct 5, 2011 · Viewed 80.1k times · Source

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?

Answer

solo117 picture solo117 · Oct 6, 2011

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!