package mysql-server-5.7 5.7.22-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1776846 reported by Mir Abd-ul-Haseeb
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.22-0ubuntu0.16.04.1
ProcVersionSignature: Ubuntu 4.4.0-127.153-generic 4.4.128
Uname: Linux 4.4.0-127-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.16
AptOrdering:
 nethogs: Install
 mysql-server-5.7: Configure
 mysql-server: Configure
 nethogs: Configure
 NULL: ConfigurePending
Architecture: amd64
Date: Thu Jun 14 12:33:46 2018
DpkgHistoryLog:
 Start-Date: 2018-06-14 12:33:36
 Commandline: apt-get install nethogs
 Requested-By: django (1000)
 Install: nethogs:amd64 (0.8.1-0.3)
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2018-04-05 (69 days ago)
InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
Logs.var.log.daemon.log:

MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
 [mysqldump]
 quick
 quote-names
 max_allowed_packet = 16M
MySQLConf.etc.mysql.mysql.conf.d.mysqld_safe_syslog.cnf:
 [mysqld_safe]
 syslog
MySQLVarLibDirListing: ['performance_schema', 'pj_db', 'debian-5.7.flag', 'mysql', 'ib_logfile1', 'world', 'auto.cnf', 'ib_logfile0', 'ib_buffer_pool', 'ibtmp1', 'ibdata1', 't1', 'sys']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-4.4.0-127-generic root=UUID=b89ec859-a9f4-46ce-9556-9367a6434d37 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.4
 apt 1.2.26
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 5.7.22-0ubuntu0.16.04.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Mir Abd-ul-Haseeb (abdulhaseeb) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

On package setup from your log:
mysql_upgrade: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) while connecting to the MySQL server

This is usually going through a local socket and needs no Password.
But in your case that socket was not reachable.

I see int he logs that mysql was installed/removed plenty of times.
Could on one of those a config change have been made that breaks this.

If this is all fresh you should consider purging all of mysql to get rid of potentially broken configs. And then reinstall the packages cleanly.
That might resolve your issue.

If OTOH you have special background knowledge why on your system that local socket fails please just fix that and an install/upgrade will work.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

On upgrading a service this service has to be restarted to pick up the fixes.
Rather rarely a real issue occurs that the newer version does e.g. fail with the formerly working configuration.
But most of the time what happens is, that a service was installed, but stays unconfigured or experimented with but left in a broken state.

Now on any update of the related packages that service has to be restarted, but since its config is incomplete/faulty it fails to restart.
Therefore the update of that package has to consider itself incomplete.

Depending on your particular case there are two solutions:
- either remove the offending package if you don't want to continue using it.
- Or if you do want to keep it please fix the configuration so that re-starting the service will work.

Since it seems likely to me that this is a local configuration problem, rather than a bug in Ubuntu, I'm marking this bug as Incomplete.

If indeed this is a local configuration problem, you can find pointers to get help for this sort of problem here: http://www.ubuntu.com/support/community

Or if you believe that this is really a bug, then you may find it helpful to read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful if you would then provide a more complete description of the problem, explain why you believe this is a bug in Ubuntu rather than a problem specific to your system, and then change the bug status back to New.

Changed in mysql-5.7 (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mysql-5.7 (Ubuntu) because there has been no activity for 60 days.]

Changed in mysql-5.7 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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