Comment 18 for bug 880339

Revision history for this message
martin suchanek (martin-suc) wrote :

I have got into this problem after purge reinstallation of mysql server 5.5 in precise as well.
It has been working for some time until I have created new database and couple of tables I could not restart database.
I have got this error:

Jun 2 19:34:35 PCEUBU1 kernel: [38487.429346] type=1400 audit(1338662075.109:540): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=32449 comm="apparmor_parser"
Jun 2 19:34:35 PCEUBU1 kernel: [38487.435393] init: mysql main process (32453) terminated with status 1
Jun 2 19:34:35 PCEUBU1 kernel: [38487.435405] init: mysql respawning too fast, stopped

I do not have any "DENIED" within apparmor in dmesg.
I switched /usr/sbin/mysqld into complain mod and /etc/apparmor.d/usr.sbin.mysqld contains:

/usr/sbin/mysqld flags=(complain) {
  #include <abstractions/base>
  #include <abstractions/nameservice>
  #include <abstractions/user-tmp>
  #include <abstractions/mysql>
  #include <abstractions/winbind>

  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/mysql/conf.d/ r,
  /etc/mysql/conf.d/* r,
  /etc/mysql/*.cnf r,
  /usr/lib/mysql/plugin/ r,
  /usr/lib/mysql/plugin/*.so* mr,
  /usr/sbin/mysqld mr,
  /usr/share/mysql/** r,
  /var/log/mysql.log rw,
  /var/log/mysql.err rw,
  /var/lib/mysql/ r,
  /var/lib/mysql/** rwk,
  /var/log/mysql/ r,
  /var/log/mysql/* rw,
  /var/run/mysqld/mysqld.pid w,
  /var/run/mysqld/mysqld.sock w,
  /run/mysqld/mysqld.pid w,
  /run/mysqld/mysqld.sock w,

  /sys/devices/system/cpu/ r,

but it did not allow to start mysqld.

any sollution ? (I would not like to reinstall it again - I still would like to put my backuped databases back)

thank you,
kind regards,
M.