MySQL Upgrade Errors

Doug Burks edited this page Aug 1, 2018 · 7 revisions

Ubuntu released new MySQL packages for Ubuntu 16.04 on July 30, 2018: https://usn.ubuntu.com/3725-1/

If you have a Security Onion 16.04 installation and run soup to install these new MySQL packages, you may see a few error messages as described below. We'll be releasing a new version of soup that will avoid these issues for future MySQL upgrades: https://github.com/Security-Onion-Solutions/security-onion/issues/1283

In the meantime, please continue reading for more information and workarounds.

Error message regarding MySQL 5.5

Error messages regarding MySQL 5.5 can be ignored as Security Onion 16.04 uses MySQL 5.7:

Package mysql-server-5.5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  mysql-server-5.7 mysql-common percona-xtradb-cluster-server-5.6:i386 percona-server-server-5.6:i386 mysql-testsuite-5.7:i386 mariadb-server-10.0:i386 percona-xtradb-cluster-server-5.6
  percona-server-server-5.6 mysql-testsuite-5.7 mariadb-server-10.0 mysql-server-5.7:i386

Package mysql-server-core-5.5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  mysql-server-core-5.7 percona-server-server-5.6:i386 mariadb-server-core-10.0:i386 percona-server-server-5.6 mariadb-server-core-10.0 mysql-server-core-5.7:i386

E: Package 'mysql-server-core-5.5' has no installation candidate
E: Package 'mysql-server-5.5' has no installation candidate

Error messages regarding MySQL upgrade process

If your installation has MySQL disabled (because you haven't yet run Setup or you've run Setup and chosen Forward Node or Storage Node), then you may also see error messages like the following:

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

No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          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

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

You can resolve this issue using the following one-liner:

sudo systemctl enable mysql.service && sudo apt -f install && sudo systemctl stop mysql.service && sudo systemctl disable mysql.service
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.