postinst fails when settings in debian.cnf no longer work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-5.7 (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
After an apt-get upgrade today, mysql-server-5.6 got uninstalled, but nothing came to replace it.
I therefore used apt-get install mysql-server to get the latest 5.7, but it could not be configured (dpkg threw out error 11, about 5.7 not being configured).
ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 (not installed)
ProcVersionSign
Uname: Linux 4.4.0-17-lowlatency x86_64
NonfreeKernelMo
ApportVersion: 2.20.1-0ubuntu1
Architecture: amd64
Date: Thu Apr 7 19:11:30 2016
ErrorMessage: subprocess installed post-installation script returned error exit status 11
InstallationDate: Installed on 2016-01-13 (84 days ago)
InstallationMedia: Kubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
RelatedPackageV
dpkg 1.18.4ubuntu1
apt 1.2.10
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 (not installed) failed to install/upgrade: subprocess installed post-installation script returned error exit status 11
UpgradeStatus: No upgrade log present (probably fresh install)
summary: |
- package mysql-server-5.7 not installed failed to install/upgrade: - subprocess installed post-installation script returned error exit status - 11 + postinst fails when settings in debian.cnf no longer work |
Changed in mysql-5.7 (Ubuntu): | |
importance: | Undecided → High |
Turns out that when dpkg configures the package, it tries to run mysql_upgrade with the root user and no password, which is insane to do to a database.
I propose that the dpkg prompts the user for a username and then runs:
mysql_upgrade -u $user -p
and then the user is asked for a password.