package mysql-server-8.0 8.0.33-0ubuntu0.22.04.4 failed to install/upgrade: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1 on upgrade from Fossa after an upgrade from Bionic
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-8.0 (Ubuntu) |
Triaged
|
Undecided
|
Unassigned |
Bug Description
This happened on a Bionic server install. I upgraded to Focal, using the maintainer config file instead of mine, with no apparent issue.
I then upgraded to Jammy and this happened near the end of the upgrade.
ProblemType: Package
DistroRelease: Ubuntu 22.04
Package: mysql-server-8.0 8.0.33-
ProcVersionSign
Uname: Linux 5.4.0-155-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckR
CloudArchitecture: x86_64
CloudID: aws
CloudName: aws
CloudPlatform: ec2
CloudRegion: eu-west-3
CloudSubPlatform: metadata (http://
Date: Tue Aug 1 14:19:57 2023
Ec2AMI: ami-04feb857774
Ec2AMIManifest: (unknown)
Ec2Architecture: x86_64
Ec2Availability
Ec2Imageid: ami-04feb857774
Ec2InstanceType: t3.medium
Ec2Instancetype: t3.medium
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
Ec2Region: eu-west-3
ErrorMessage: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Logs.var.
MySQLConf.
MySQLConf.
[mysqld_safe]
syslog
MySQLConf.
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
MySQLConf.
MySQLConf.
[mysqld_safe]
syslog
MySQLVarLibDirL
ProcCmdline: BOOT_IMAGE=
Python3Details: /usr/bin/
PythonDetails: N/A
RebootRequiredPkgs: Error: path contained symlinks.
RelatedPackageV
dpkg 1.21.1ubuntu2.2
apt 2.4.9
SourcePackage: mysql-8.0
Title: package mysql-server-8.0 8.0.33-
UpgradeStatus: Upgraded to jammy on 2023-08-01 (0 days ago)
tags: | removed: need-duplicate-check |
These are the relevant snippets from the attached logs:
Setting up mysql-server-8.0 (8.0.33- 0ubuntu0. 22.04.4) ... mysql/ibdata1 does not exist.
Specified filename /var/lib/
...
[ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
And in the mysql log, we see:
[System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.33- 0ubuntu0. 20.04.4) starting as process 1569 0ubuntu0. 20.04.4) (Ubuntu). 0ubuntu0. 22.04.4) starting as process 65221 0ubuntu0. 22.04.4) (Ubuntu).
[ERROR] [MY-011011] [Server] Failed to find valid data directory.
[ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
[ERROR] [MY-010119] [Server] Aborting
[System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.33-
[System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.33-
[ERROR] [MY-011011] [Server] Failed to find valid data directory.
[ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
[ERROR] [MY-010119] [Server] Aborting
[System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.33-
which shows that the service was already failing to start for the 20.04 package.
Finally, the old config file has an entry:
datadir = /var/lib/ jenkins/ mysql
while the new config file has no such entry.
From the data above, I suppose your initial mysql installation used /var/lib/ jenkins/ mysql and mysql was never set to run using the default datadir.
Since updating the data in the datadir is part of the mysql upgrade process, you should not accept replacing your configuration files with the default ones during the package upgrade process, since you do have a custom mysql setup.
To upgrade the package, you should instead ensure your configuration file is compatible with the new mysql version.
Since this seems to be a configuration issue rather than a bug in the package, I am marking this bug as incomplete for now. If you disagree with the assessment, please state the reasons you believe this is indeed a bug with the mysql package and set the status of this bug back to new.