cannot create socket file in /run/mysql because of apparmor profile
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-5.5 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
/usr/sbin/mysqld {
#include <abstractions/base>
#include <abstractions/
#include <abstractions/
#include <abstractions/
#include <abstractions/
capability dac_override,
capability sys_resource,
capability setgid,
capability setuid,
network tcp,
/etc/hosts.allow r,
/etc/hosts.deny r,
/etc/mysql/*.pem r,
/etc/
/etc/
/etc/mysql/*.cnf r,
/usr/
/usr/
/usr/sbin/mysqld mr,
/usr/
/var/
/var/
/var/lib/mysql/ r,
/var/lib/mysql/** rwk,
/var/log/mysql/ r,
/var/log/mysql/* rw,
/var/
/var/
/sys/
# Site-specific additions and overrides. See local/README for details.
#include <local/
}
However, /var/run is a symlink to /run, so this will cause failures:
Jan 17 08:47:52 ip-10-80-154-252 kernel: [1026921.882718] type=1400 audit(132679007
Since the path is still specified as /var/run, and the package may be installed and started during a lucid upgrade, I think both dirs should be listed in the apparmor profile for 12.04 (it can be reduced to just /run for all subsequent releases).
possilby unrelated issue:
my mysqld does not start anymore but i see a different output in the dmesg log, while the mysql logfiles hold no data (0 byte size) or are old.. so additional to not being functional it does not log useful things itself. why doesn't it log an error to error.log if it fails to start up?
[ 5808.819908] type=1400 audit(132923105 2.884:214) : apparmor="STATUS" operation= "profile_ replace" name="/ usr/sbin/ mysqld" pid=21353 comm="apparmor_ parser" 3.184:215) : apparmor="STATUS" operation= "profile_ replace" name="/ usr/sbin/ mysqld" pid=21567 comm="apparmor_ parser"
[ 5808.852044] init: mysql main process (21357) terminated with status 1
[ 5808.852082] init: mysql main process ended, respawning
[ 5839.091120] init: mysql post-start process (21358) terminated with status 1
[ 5839.119371] type=1400 audit(132923108
[ 5839.165561] init: mysql main process (21571) terminated with status 1
[ 5839.165599] init: mysql main process ended, respawning
[ 5869.402467] init: mysql post-start process (21572) terminated with status 1