package mysql-server-5.5 5.5.24-0ubuntu0.12.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1012058 reported by sviperll
322
This bug affects 52 people
Affects Status Importance Assigned to Milestone
mysql-5.5 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Just install an update from update-manager and got error

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: mysql-server-5.5 5.5.24-0ubuntu0.12.04.1
ProcVersionSignature: Ubuntu 3.2.0-24.39-generic 3.2.16
Uname: Linux 3.2.0-24-generic x86_64
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
Date: Tue Jun 12 14:47:19 2012
DuplicateSignature:
 Setting up mysql-server-5.5 (5.5.24-0ubuntu0.12.04.1) ...
 start: Job failed to start
 invoke-rc.d: initscript mysql, action "start" failed.
 dpkg: error processing mysql-server-5.5 (--configure):
  subprocess installed post-installation script returned error exit status 1
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
Logs.var.log.daemon.log:

SourcePackage: mysql-5.5
Title: package mysql-server-5.5 5.5.24-0ubuntu0.12.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to precise on 2012-04-28 (44 days ago)

Revision history for this message
sviperll (asviraspossible) wrote :
tags: removed: need-duplicate-check
Revision history for this message
sviperll (asviraspossible) wrote :

The problem was default-character-set setting in mysqld section of my mysql configuration file:

    [mysqld]
    default-character-set=utf8

Due to upstream changes in MySQL it should be replaced with character-set-server setting:

    [mysqld]
    character-set-server=utf8

Revision history for this message
sviperll (asviraspossible) wrote :

The package installation script can direct user to http://dev.mysql.com/doc/refman/5.5/en/news-5-5-3.html page for the list of all incompatible changes.

Alternatively some configuration directives can be automatically fixed...

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
Revision history for this message
Brian R. Hellman (brian-linbit) wrote :

This workaround didn't work for me... I tried running it from the command line and got this:

root@w3:/etc/init# mysqld --config /etc/mysql/my.cnf --user=mysql --verbose
120612 9:17:07 [Note] Plugin 'FEDERATED' is disabled.
120612 9:17:07 InnoDB: The InnoDB memory heap is disabled
120612 9:17:07 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120612 9:17:07 InnoDB: Compressed tables use zlib 1.2.3.4
mysqld: Can't create/write to file '/tmp/ibwIP7DX' (Errcode: 13)
120612 9:17:07 InnoDB: Error: unable to create temporary file; errno: 13
120612 9:17:07 [ERROR] Plugin 'InnoDB' init function returned error.
120612 9:17:07 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120612 9:17:07 [ERROR] mysqld: unknown option '--config'
120612 9:17:07 [ERROR] Aborting

Obviously the --config option is wrong, but the important line is:
mysqld: Can't create/write to file '/tmp/ibwIP7DX' (Errcode: 13)

After using: 'setfacl -m u:mysql:rwx /tmp' I can now start mysql I tried adding /tmp/** rwk, to the apparmor profile but that didn't work.

Hopefully this helps someone figure out what the real issue is, but in the meantime for anyone that got bit by this, that's the workaround that did it for me.

Revision history for this message
Torsten Krah (tkrah) wrote :

I've got similar message but nothing about failed tmp files - it does shutdown because --config option is wrong it tells:

root@sf050:/etc/mysql# mysqld --config /etc/mysql/my.cnf --user=mysql --verbose
120613 9:54:42 [Note] Plugin 'FEDERATED' is disabled.
120613 9:54:42 InnoDB: The InnoDB memory heap is disabled
120613 9:54:42 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120613 9:54:42 InnoDB: Compressed tables use zlib 1.2.3.4
120613 9:54:42 InnoDB: Initializing buffer pool, size = 128.0M
120613 9:54:42 InnoDB: Completed initialization of buffer pool
120613 9:54:42 InnoDB: highest supported file format is Barracuda.
120613 9:54:42 InnoDB: Waiting for the background threads to start
120613 9:54:43 InnoDB: 1.1.8 started; log sequence number 39819140532
120613 9:54:43 [ERROR] mysqld: unknown option '--config'
120613 9:54:43 [ERROR] Aborting

120613 9:54:43 InnoDB: Starting shutdown...
120613 9:54:43 InnoDB: Shutdown completed; log sequence number 39819140532
120613 9:54:43 [Note] mysqld: Shutdown complete

Revision history for this message
Torsten Krah (tkrah) wrote :

Nvm my last comment, --config is wrong, it must obviously read --defaults-file=/etc/mysql/my.cnf, works after that.

Revision history for this message
Mark Mays (mmays) wrote :

In my case this was caused by a network change that made the bind address in /etc/mysql/my.cnf invalid. Fixing the bind address enabled the system to update the configuration through apt-get.

Revision history for this message
Houman (houmie) wrote :

I just blew a production server. Ouch. Can someone please write a step by step what needs to be done as workaround. I tried the steps above and mySql shuts down and do an upgrade again and its back to the old problem. How did that work for you?

Revision history for this message
Mark Mays (mmays) wrote : Re: [Bug 1012058] Re: package mysql-server-5.5 5.5.24-0ubuntu0.12.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

I'm not sure my situation is the same as yours.

I checked for the language setting in my.cnf, and don't have one, so
determined that is not the problem.

I realized that around the same time that I ran the update, I had changed
routers and had a different network address for my server. I changed the
bind address in my.cnf and then ran
sudo apt-get install

It doesn't do the install but completes the configuration if it is left
hanging. That worked for me.

Mark Mays

On Sat, Jun 16, 2012 at 12:48 PM, Houman <email address hidden> wrote:

> I just blew a production server. Ouch. Can someone please write a step
> by step what needs to be done as workaround. I tried the steps above and
> mySql shuts down and do an upgrade again and its back to the old
> problem. How did that work for you?
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1014034).
> https://bugs.launchpad.net/bugs/1012058
>
> Title:
> package mysql-server-5.5 5.5.24-0ubuntu0.12.04.1 failed to
> install/upgrade: subprocess installed post-installation script
> returned error exit status 1
>
> Status in “mysql-5.5” package in Ubuntu:
> Confirmed
>
> Bug description:
> Just install an update from update-manager and got error
>
> ProblemType: Package
> DistroRelease: Ubuntu 12.04
> Package: mysql-server-5.5 5.5.24-0ubuntu0.12.04.1
> ProcVersionSignature: Ubuntu 3.2.0-24.39-generic 3.2.16
> Uname: Linux 3.2.0-24-generic x86_64
> ApportVersion: 2.0.1-0ubuntu8
> Architecture: amd64
> Date: Tue Jun 12 14:47:19 2012
> DuplicateSignature:
> Setting up mysql-server-5.5 (5.5.24-0ubuntu0.12.04.1) ...
> start: Job failed to start
> invoke-rc.d: initscript mysql, action "start" failed.
> dpkg: error processing mysql-server-5.5 (--configure):
> subprocess installed post-installation script returned error exit
> status 1
> ErrorMessage: subprocess installed post-installation script returned
> error exit status 1
> InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
> Logs.var.log.daemon.log:
>
> SourcePackage: mysql-5.5
> Title: package mysql-server-5.5 5.5.24-0ubuntu0.12.04.1 failed to
> install/upgrade: subprocess installed post-installation script returned
> error exit status 1
> UpgradeStatus: Upgraded to precise on 2012-04-28 (44 days ago)
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/1012058/+subscriptions
>

tags: added: bugpattern-needed
Revision history for this message
OE (onno-ebbinge) wrote :

It's apparmor. See /var/log/syslog

Aug 1 22:37:19 magna kernel: [119350.467189] type=1400 audit(1343853439.594:46): apparmor="DENIED" operation="mknod" parent=15003 profile="/usr/sbin/mysqld" name="/run/tmp/ibQJ1cz5" pid=15094 comm="mysqld

Note: I've symlinked /tmp to /run/tmp ...

To fix, edit: /etc/apparmor.d/usr.sbin.mysqld, and add:

  /tmp/** rwk,
  /run/tmp/** rwk,

Maybe I could do without the last or with fewer rights, but I'm in a hurry...

Revision history for this message
ce107 (ce107-acm) wrote :

The last trick did not do it for me. But removing ibdata1 (which had a length of zero and mysqld was complaining about that at startup) from /var/lib/mysql did solve the problem. Of course if instead of zero length it had useful stuff in it this is no solution.

Revision history for this message
Paul Hewlett (phewlett76) wrote :

In my case I get this:

Setting up mysql-client-5.5 (5.5.24-0ubuntu0.12.04.1) ...
Setting up mysql-server-5.5 (5.5.24-0ubuntu0.12.04.1) ...
120922 20:50:10 [Note] Plugin 'FEDERATED' is disabled.
120922 20:50:10 InnoDB: The InnoDB memory heap is disabled
120922 20:50:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120922 20:50:10 InnoDB: Compressed tables use zlib 1.2.3.4
120922 20:50:10 InnoDB: Initializing buffer pool, size = 128.0M
120922 20:50:10 InnoDB: Completed initialization of buffer pool
120922 20:50:10 InnoDB: highest supported file format is Barracuda.
120922 20:50:10 InnoDB: Waiting for the background threads to start
120922 20:50:11 InnoDB: 1.1.8 started; log sequence number 1595675
120922 20:50:11 InnoDB: Starting shutdown...
120922 20:50:12 InnoDB: Shutdown completed; log sequence number 1595675
start: Unknown job: mysql -d
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up libhtml-template-perl (2.10-1) ...
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 is not configured yet.
dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
Setting up python-mysqldb (1.2.3-1build1) ...
No apport report written because the error message indicates it's a follow-up error from a previous failure.
                            Errors were encountered while processing:
 mysql-server-5.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
yashwanth maheshwaram (yashwanth34) wrote :

I have the same issue and not able to install/work with any DB.
Any update on this so far ?

Revision history for this message
mattcsully (matt-matt-sullivan) wrote :

So far this install is a bust. What should I use to replace mysql?

Revision history for this message
mattcsully (matt-matt-sullivan) wrote :

The solution provided at the bottom of https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/1036043 works!

Revision history for this message
Roberto López (tshieldracing) wrote :

Thanks for the information but it doesn't work on my system!

> Date: Fri, 26 Oct 2012 00:24:16 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 1012058] Re: package mysql-server-5.5 5.5.24-0ubuntu0.12.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
>
> The solution provided at the bottom of
> https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/1036043 works!
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1012058
>
> Title:
> package mysql-server-5.5 5.5.24-0ubuntu0.12.04.1 failed to
> install/upgrade: subprocess installed post-installation script
> returned error exit status 1
>
> Status in “mysql-5.5” package in Ubuntu:
> Confirmed
>
> Bug description:
> Just install an update from update-manager and got error
>
> ProblemType: Package
> DistroRelease: Ubuntu 12.04
> Package: mysql-server-5.5 5.5.24-0ubuntu0.12.04.1
> ProcVersionSignature: Ubuntu 3.2.0-24.39-generic 3.2.16
> Uname: Linux 3.2.0-24-generic x86_64
> ApportVersion: 2.0.1-0ubuntu8
> Architecture: amd64
> Date: Tue Jun 12 14:47:19 2012
> DuplicateSignature:
> Setting up mysql-server-5.5 (5.5.24-0ubuntu0.12.04.1) ...
> start: Job failed to start
> invoke-rc.d: initscript mysql, action "start" failed.
> dpkg: error processing mysql-server-5.5 (--configure):
> subprocess installed post-installation script returned error exit status 1
> ErrorMessage: subprocess installed post-installation script returned error exit status 1
> InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
> Logs.var.log.daemon.log:
>
> SourcePackage: mysql-5.5
> Title: package mysql-server-5.5 5.5.24-0ubuntu0.12.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
> UpgradeStatus: Upgraded to precise on 2012-04-28 (44 days ago)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/1012058/+subscriptions

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.