[Bug 1745185] Re: If apt-get upgrade is run on mysql server when the server is disabled, the upgrade fails.
Andreas Hasenack
andreas at canonical.com
Wed Oct 31 18:27:34 UTC 2018
This is what I used to test:
- disable updates and security in /etc/apt/sources.list
- install mysql-server-5.7 (or whatever version is shipped in that release of ubuntu)
- use mysql command line to connect and create a test database
- stop mysql: sudo systemctl stop mysql
- disable mysql: sudo systemctl disable mysql
- re-enable updates and security in sources.list
- apt dist-upgrade
In bionic, the above worked. During the pkg upgrade, mysql was started
up a few times, but at the end of the dist-upgrade command mysql was
stopped and no errors were reported.
In xenial, it failed:
Setting up mysql-server-5.7 (5.7.24-0ubuntu0.16.04.1) ...
Installing new version of config file /etc/mysql/debian-start ...
Renaming removed key_buffer and myisam-recover options (if present)
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
Setting up distro-info-data (0.28ubuntu0.9) ...
Setting up libcurl3-gnutls:amd64 (7.47.0-1ubuntu2.11) ...
Setting up curl (7.47.0-1ubuntu2.11) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
mysql-server-5.7
E: Sub-process /usr/bin/dpkg returned an error code (1)
--
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1745185
Title:
If apt-get upgrade is run on mysql server when the server is disabled,
the upgrade fails.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1745185/+subscriptions
More information about the Ubuntu-server-bugs
mailing list