mysql-server fails to upgrade if it is not running
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-5.7 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Ubuntu 16.04.1 LTS
mysql-server:
Installed: 5.7.15-
Candidate: 5.7.15-
Version table:
*** 5.7.15-
500 http://
500 http://
500 http://
500 http://
100 /var/lib/
5.
500 http://
500 http://
If mysql server is installed but not running, upgrade will fail with an error.
Expected behaviour: If MySQL is not running, the script should launch it.
I have MySQL server installed but I changed the configuration so that it doesn't run automatically. Whenever there's an upgrade, this fails with an error as shown below. This is a bug in the packaging/scripts of mysql server, not in mysql-server itself.
Setting up mysql-server-5.7 (5.7.15-
insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).
mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/
Upgrade process encountered error and will not continue.
mysql_upgrade failed with exit status 11
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)