Failed to upgrade to mysql-server-8.0 when xenial-era config is present

Bug #1920188 reported by Dewie
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-8.0 (Ubuntu)
Triaged
High
Unassigned

Bug Description

Failure attempting to upgrade to Ubuntu 20.10 from 16.xx (first upgraded to 18.xx)

1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu
Description: Ubuntu 20.10
Release: 20.10

2) The version of the package you are using, via 'apt-cache policy pkgname' or by checking in Software Center
N: Unable to locate package pkgname

3) What you expected to happen
Upgrade is successful

4) What happened instead
I was presented with an error and the ability to submit a bug.

ProblemType: Package
DistroRelease: Ubuntu 20.10
Package: mysql-server-8.0 8.0.23-0ubuntu0.20.10.1
ProcVersionSignature: Ubuntu 5.4.0-67.75-generic 5.4.94
Uname: Linux 5.4.0-67-generic x86_64
ApportVersion: 2.20.11-0ubuntu50.5
Architecture: amd64
CasperMD5CheckResult: skip
Date: Fri Mar 19 10:23:11 2021
ErrorMessage: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2016-03-12 (1832 days ago)
InstallationMedia: Ubuntu-Server 14.04.4 LTS "Trusty Tahr" - Release amd64 (20160217.1)
Logs.var.log.daemon.log:

MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
MySQLConf.etc.mysql.conf.d.mysqld_safe_syslog.cnf:
 [mysqld_safe]
 syslog
MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
 [mysqldump]
 quick
 quote-names
 max_allowed_packet = 16M
MySQLConf.etc.mysql.mysql.conf.d.mysqld_safe_syslog.cnf:
 [mysqld_safe]
 syslog
ProcCmdline: BOOT_IMAGE=/vmlinuz-5.4.0-67-generic root=/dev/mapper/VM--FileServer--vg-root ro
Python3Details: /usr/bin/python3.8, Python 3.8.6, python3-minimal, 3.8.6-0ubuntu1
PythonDetails: /usr/bin/python2.7, Python 2.7.18, python-is-python2, 2.7.17-4
RelatedPackageVersions:
 dpkg 1.20.5ubuntu2
 apt 2.1.10ubuntu0.2
SourcePackage: mysql-8.0
Title: package mysql-server-8.0 8.0.23-0ubuntu0.20.10.1 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to groovy on 2021-03-19 (0 days ago)

Revision history for this message
Dewie (dewiepedia) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Dewie (dewiepedia) wrote :

After a few minutes with Google I determined I was not alone and the following:

https://serverfault.com/questions/1042327/after-an-upgrade-to-ubuntu-20-04-lts-why-does-mysql-not-start

lead to to the solution of:

comment out the following two lines in /etc/mysql/my.cnf

query_cache_limit = 1M
query_cache_size = 16M

I seem to be up and going now.

Revision history for this message
Bryce Harrington (bryce) wrote :

A plain default install of mysql-server on Xenial does indeed have these settings enabled:

    triage-xenial+16.04:/etc/mysql$ grep ^query mysql.conf.d/mysqld.cnf
    query_cache_limit = 1M
    query_cache_size = 16M

From the linked reference, it appears both of these (among others) are documented as removed in mysql 8.0:

    https://dev.mysql.com/doc/refman/8.0/en/added-deprecated-removed.html#optvars-removed

I am in process of upgrading the xenial container to see if I can reproduce the defect and will report back on that once it's done.

Changed in mysql-8.0 (Ubuntu):
importance: Undecided → High
status: New → Triaged
summary: - package mysql-server-8.0 8.0.23-0ubuntu0.20.10.1 failed to
- install/upgrade: installed mysql-server-8.0 package post-installation
- script subprocess returned error exit status 1
+ Failed to upgrade to mysql-server-8.0 when xenial-era config is present
Revision history for this message
Bryce Harrington (bryce) wrote :

The vanilla xenial -> bionic -> focal upgrade succeeded for me. mysql was upgraded to 8.0, and the "query_cache*" parameters were removed from my config file. The mysql-server service appears to be running without error.

My suspicion is that there is a custom setting in your config making it not a pure vanilla upgrade. This is actually a known issue, here:

https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/1612517

I'm going to dupe this to that bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.