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

Bug #1382285 reported by Trev
138
This bug affects 30 people
Affects Status Importance Assigned to Milestone
mysql-5.5 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Ubuntu reported incomplete updates and recommended oartial upgrade. Went ahead with download of 100mb all went well except mysql 5.5 which was reported to me as a bug in the update.

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: mysql-server-5.5 5.5.40-0ubuntu0.14.04.1
ProcVersionSignature: Ubuntu 3.13.0-37.64-generic 3.13.11.7
Uname: Linux 3.13.0-37-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: amd64
Date: Fri Oct 17 11:08:06 2014
DuplicateSignature: package:mysql-server-5.5:5.5.40-0ubuntu0.14.04.1:subprocess installed post-installation script returned error exit status 1
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2012-12-22 (663 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
Logs.var.log.daemon.log:

MySQLConf.etc.mysql.conf.d..keepme:
MySQLConf.etc.mysql.conf.d.mysqld.safe.syslog.cnf:
 [mysqld_safe]
 syslog
MySQLVarLibDirListing: ['ib_logfile0', 'ib_logfile1', 'debian-5.5.flag', 'mysql_upgrade_info', 'mysql', 'ibdata1', 'performance_schema']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-3.13.0-37-generic root=UUID=655697f5-6807-4a38-962c-57843634b535 ro
SourcePackage: mysql-5.5
Title: package mysql-server-5.5 5.5.40-0ubuntu0.14.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to trusty on 2014-04-19 (180 days ago)

Revision history for this message
Trev (tjones-r) wrote :
tags: removed: need-duplicate-check
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
Yuv (yuv) wrote :

I encountered the same problem and solved it. I have tried a number of things, so I am not 100% sure which one it is that solved it. If I were to do it all from scratch again, this is my suggestion for troubleshooting the problem:

1. look at /var/log/mysql/error.log for lines with the [ERROR] tag. In my case, the one preventing mysqld from starting (and thus breaking the upgrade which expected a running mysqld) was

  141109 10:48:23 [ERROR] /usr/sbin/mysqld: unknown variable 'default-character-set=utf8'

2. search for the meaning of the error message. In my case, I found <http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_default-character-set>

3. edit /etc/mysql/my.ini to remove the source of the error. In my case, I changed the old charset and collation default options to

  # deprecated:
  # default-character-set=utf8
  # default-collation=utf8_unicode_ci
  # the newer options:
  character-set-server=utf8
  collation-server=utf8_unicode_ci

4. try again to start mysqld / run the upgrade and repeat until there are no new errors in the error log and mysqld is started after the upgrade.

  sudo apt-get upgrade
  sudo service mysql start

5. if necessary, try reinstalling (I did this, not sure it contributed to the solution, but just in case):
  sudo apt-get remove mysql-client* mysql-server*
  sudo apt-get install mysql-server

Revision history for this message
Yuv (yuv) wrote :

Potential solutions to the bug report:
(1) The lazy solution: this report will be marked as invalid, because the problem is not in the package but in the user's configuration file
(2) The smart solution: a parser to check the user's configuration file and issue warnings for deprecated configuration options
(3) The mid-way solution: catch the exit status code after starting mysqld and if it fails to start suggest to the user to investigate their configuration file
(4) An alternative solution: catch the exit status code after starting mysqld and if it fails to start, put forward the option to the user to backup the old configuration file and install a fresh one

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.