Public bug reported:

Ubuntu 16.04.1 LTS

mysql-server:
  Installed: 5.7.15-0ubuntu0.16.04.1
  Candidate: 5.7.15-0ubuntu0.16.04.1
  Version table:
 *** 5.7.15-0ubuntu0.16.04.1 500
        500 http://gb.archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
        500 http://gb.archive.ubuntu.com/ubuntu xenial-updates/main i386 
Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 
Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages
        100 /var/lib/dpkg/status
     5.7.11-0ubuntu6 500
        500 http://gb.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        500 http://gb.archive.ubuntu.com/ubuntu xenial/main i386 Packages


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-0ubuntu0.16.04.1) ...
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/mysqld/mysqld.sock' (2) while connecting to the MySQL server
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.
                                                                                
                            Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

** Affects: mysql-5.7 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1626420

Title:
  mysql-server fails to upgrade if it is not running

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1626420/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to