Mysql failed to start

Bug #1011702 reported by Aymeric
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
mysql-5.5 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hi,
Mysql can't start, on my Ubuntu 12.04. There is an error in a apparmor profile.

You could found the fail case, and a "workaround" to getting it work.

Running as root:
# service mysql start
start: Job failed to start
(in log) init: mysql pre-start process (6912) terminated with status 1

While investigating I found this error:
# /lib/init/apparmor-profile-load usr.sbin.mysqld
AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at line 44: Could not open 'local/usr.sbin.mysqld'
# debsums -a mysql-server-5.5 |grep apparmor
/etc/apparmor.d/usr.sbin.mysqld OK

At this point I made a backup of original /etc/apparmor.d/usr.sbin.mysqld to /etc/apparmor.d/usr.sbin.mysqld.orig and I add a space like the diff show.

# diff /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/usr.sbin.mysqld.orig
44c44
< # include <local/usr.sbin.mysqld>
---
> #include <local/usr.sbin.mysqld>
# /lib/init/apparmor-profile-load usr.sbin.mysqld
# echo $?
0

Trying to running mysql service again give no error
# service mysql start
mysql start/running, process 7994

And debsums failed:
# debsums -a mysql-server-5.5 |grep apparmor
/etc/apparmor.d/usr.sbin.mysqld FAILED

Validating that mysql-server is loaded:
$ mysql -u root -p <<< status
Enter password:
--------------
mysql Ver 14.14 Distrib 5.5.22, for debian-linux-gnu (i686) using readline 6.2

Connection id: 122
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.5.22-0ubuntu1-log (Ubuntu)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/run/mysqld/mysqld.sock
Uptime: 2 min 31 sec

Threads: 1 Questions: 351 Slow queries: 0 Opens: 491 Flush tables: 1 Open tables: 121 Queries per second avg: 2.324
--------------

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: mysql-server-5.5 5.5.22-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-24.39-generic 3.2.16
Uname: Linux 3.2.0-24-generic i686
ApportVersion: 2.0.1-0ubuntu8
Architecture: i386
Date: Mon Jun 11 18:10:24 2012
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
Logs.var.log.daemon.log:

Logs.var.log.kern.log:
 Jun 11 18:05:28 petita-laptop kernel: [ 6531.054669] type=1400 audit(1339430728.531:24): apparmor="STATUS" operation="profile_load" name="/usr/sbin/mysqld" pid=3683 comm="apparmor_parser"
 Jun 11 18:05:37 petita-laptop kernel: [ 6540.444943] type=1400 audit(1339430737.923:25): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=3695 comm="apparmor_parser"
MySQLConf.etc.mysql.conf.d.mysqld.safe.syslog.cnf:
 [mysqld_safe]
 syslog
MySQLVarLibDirListing: False
ProcEnviron:
 LANGUAGE=
 TERM=xterm
 PATH=(custom, user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: mysql-5.5
UpgradeStatus: Upgraded to precise on 2012-04-27 (45 days ago)

Revision history for this message
Aymeric (mulx) wrote :
Revision history for this message
Aymeric (mulx) wrote :

It seem to be not included in attached files.
# apt-cache policy mysql-server-5.5
# apt-cache policy mysql-server-5.5
mysql-server-5.5:
  Installed: 5.5.22-0ubuntu1
  Candidate: 5.5.22-0ubuntu1
  Version table:
 *** 5.5.22-0ubuntu1 0
        500 http://fr.archive.ubuntu.com/ubuntu/ precise/main i386 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mysql-5.5 (Ubuntu):
status: New → Confirmed
Aymeric (mulx)
description: updated
Revision history for this message
Aymeric (mulx) wrote :

According debsums there is no configuration files that have changed (except the one mentioned above) related to mysql.

$ sudo debsums -e |grep FAILED
/etc/fuse.conf FAILED
/etc/fuse.conf FAILED
/etc/gdm/Init/Default FAILED
/etc/motion/motion.conf FAILED
/etc/apparmor.d/usr.sbin.mysqld FAILED
/etc/texmf/dvipdfmx/dvipdfmx.cfg FAILED
/etc/apt/apt.conf.d/10periodic FAILED

Revision history for this message
MMlosh (mmlosh) wrote :

Weird.. reinstalling the mysql package removed the error for me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.