Mysql fails to start after upgrade to precise
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| mysql-5.5 (Ubuntu) |
High
|
Unassigned |
Bug Description
I just upgraded my box from lucid to precise using #do-release-upgrade -d.
After the upgrade I find that mysqld is no longer starting on it's own.
When I try to start it myself using
# sudo start mysql
It will just hang at the console.
At the same time, I see the accompanied text in /var/log/syslog:
Feb 17 01:36:29 supermario kernel: [ 807.108959] type=1400 audit(132946418
Feb 17 01:36:30 supermario kernel: [ 808.374330] type=1400 audit(132946419
Feb 17 01:36:30 supermario kernel: [ 808.765855] init: mysql main process (5315) terminated with status 1
Feb 17 01:36:30 supermario kernel: [ 808.765989] init: mysql main process ended, respawning
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: mysql-server-5.5 5.5.20-0ubuntu2
ProcVersionSign
Uname: Linux 3.2.0-16-generic i686
NonfreeKernelMo
ApportVersion: 1.91-0ubuntu1
Architecture: i386
Date: Fri Feb 17 01:37:07 2012
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: mysql-5.5
UpgradeStatus: Upgraded to precise on 2012-02-17 (0 days ago)
Related branches
Mario Limonciello (superm1) wrote : | #2 |
Mario Limonciello (superm1) wrote : | #3 |
I was also able to get it to start by manually adding these lines to the apparmor profile in /etc/apparmor.
/run/
/run/
There are already lines for /var/run/mysqld, but it appears that apparmor is not following the symlink that was put there during the precise upgrade.
Mario Limonciello (superm1) wrote : | #4 |
lastly this appears to not be new in that it affected mysql 5.1 as well.
Mario Limonciello (superm1) wrote : | #5 |
Worth noting that before upgrade I had mysql server 5.1 installed. After upgrade, it's no longer installed, but it wasn't purged and it still owns the conffile that is supposed to contain the apparmor profile:
supermario@
mysql-server-5.1: /etc/apparmor.
supermario@
ii libaprutil1-
ii libdbd-mysql-perl 4.020-1build2 Perl5 database interface to the MySQL database
ii libmysqlclient15off 5.1.30really5.
rc libmysqlclient16 5.1.58-1ubuntu4 MySQL database client library
ii libmysqlclient18 5.5.20-0ubuntu2 MySQL database client library
ii libqt4-sql-mysql 4:4.8.0-1ubuntu5 Qt 4 MySQL database driver
ii mysql-client 5.5.20-0ubuntu2 MySQL database client (metapackage depending on the latest version)
ii mysql-client-5.5 5.5.20-0ubuntu2 MySQL database client binaries
ii mysql-client-
ii mysql-common 5.5.20-0ubuntu2 MySQL database common files, e.g. /etc/mysql/my.cnf
ii mysql-server 5.5.20-0ubuntu2 MySQL database server (metapackage depending on the latest version)
rc mysql-server-5.0 5.1.30really5.
rc mysql-server-5.1 5.1.41-3ubuntu12.10 MySQL database server binaries
ii mysql-server-5.5 5.5.20-0ubuntu2 MySQL database server binaries and system database setup
ii mysql-server-
ii php5-mysql 5.3.8.0-1ubuntu3 MySQL module for php5
ii python-mysqldb 1.2.3-1build1 Python interface to MySQL
tags: | added: dist-upgrade |
Changed in mysql-5.5 (Ubuntu): | |
importance: | Undecided → High |
Clint Byrum (clint-fewbar) wrote : | #6 |
Hi Mario, thanks for testing this!
It looks like the apparmor profile was accidentally dropped somewhere in the 5.1 -> 5.5 transition.
The next upload should fix it.
Changed in mysql-5.5 (Ubuntu): | |
status: | New → Triaged |
Launchpad Janitor (janitor) wrote : | #7 |
This bug was fixed in the package mysql-5.5 - 5.5.20-0ubuntu3
---------------
mysql-5.5 (5.5.20-0ubuntu3) precise; urgency=low
* d/rules,
apparmor profile (LP: #934013)
* d/mysql-
to get proper behaviors from dh_installinit and dh_apparmor.
-- Clint Byrum <email address hidden> Fri, 17 Feb 2012 13:06:24 -0800
Changed in mysql-5.5 (Ubuntu): | |
status: | Triaged → Fix Released |
Ivan Ivanov (ivan-lz) wrote : | #8 |
I am using mysql server package 5.5.22-0ubuntu1
the fix above says it fixed this bug which is named "Mysql fails to start after upgrade to precise"
I dont think so:
Bug symtoms:
- my mysqld still does not want to start (even when I use a more recent mysql-server version than the one with the fix)
- I saw that it has to do with apparmor and mysql
so.. I searched aptitude with
sudo aptitude search apparmor
I purged apparmor
sudo aptitude purge apparmor apparmor-utils
and I installed it back
sudo aptitude install apparmor apparmor-utils
and :
....
AppArmor parser error for /etc/apparmor.
....
after I saw on which line of which file the problem is - I just saw there is this on the line:
#include <local/
--
then I saw local means - /etc/apparmor.
then I got in there and just created an empty file named
touch usr.sbin.mysqld
and purged apparmor and installed it again...
now my mysql started ok...
Ivan Ivanov (ivan-lz) wrote : | #9 |
short version of the above fix:
( my OS is Ubuntu 12.04 precise with mysql-server-
--
sudo touch /etc/apparmor.
sudo service apparmor restart
--
if that does not work:
--
sudo touch /etc/apparmor.
sudo aptitude purge apparmor apparmor-utils
sudo aptitude install apparmor apparmor-utils
--
Josef Prause (josef-prause) wrote : | #10 |
After upgrade to 12.04 I hit the same problem.
I used Ivan's solution, see #9, an the problem has been fixed.
Thanks, Ivan
Ivan Ivanov (ivan-lz) wrote : | #11 |
so the question is - is it an apparmor bug or mysql's ?
The fix is quite easy - this should be fixed asap!
Alex Ross (rossey-d) wrote : | #12 |
I had to add the /run/mysql/ directory to apparmor after upgrading to Ubuntu 12.04.3 LTS with 5.5.34-
--
/run/mysqld/ r,
/run/mysqld/** rw,
--
Additionally, if I tear down the apparmor profiles loaded and then comment out the apparmor line in the mysql upstart job, it's able to start.
It only hangs because of the apparmor profiles.