cannot upgrade mysql server package
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-8.0 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I'm on
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Package
mysql-server:
Installed: 8.0.22-
Candidate: 8.0.22-
Version table:
*** 8.0.22-
500 http://
500 http://
500 http://
500 http://
100 /var/lib/
8.
500 http://
500 http://
Every ubuntu update hangs/fail due to a problem with the mysql-server package.
I can reproduce the issue by running
>> sudo dpkg --configure -a
-------
Setting up mysql-server-8.0 (8.0.22-
mysqld will log errors to /var/log/
mysqld is running as pid 3977
Job for mysql.service failed because a timeout was exceeded.
See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/
Active: activating (auto-restart) (Result: timeout) since Thu 2020-12-17 12:19:37 AEDT; 10ms ago
Process: 4120 ExecStartPre=
Process: 4154 ExecStart=
Main PID: 4154 (code=exited, status=0/SUCCESS)
Dec 17 12:19:38 mail systemd[1]: mysql.service: Scheduled restart job, restart counter is at 1.
Dec 17 12:19:38 mail systemd[1]: Stopped MySQL Community Server.
Dec 17 12:19:38 mail systemd[1]: Starting MySQL Community Server...
dpkg: error processing package mysql-server-8.0 (--configure):
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-8.0; however:
Package mysql-server-8.0 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-8.0
mysql-server
-------
>> sudo dpkg-reconfigure mysql-server-8.0
-------
/usr/sbin/
-------
>> sudo apt policy mysql-server-8.0
-------
mysql-server-8.0:
Installed: 8.0.22-
Candidate: 8.0.22-
Version table:
*** 8.0.22-
500 http://
500 http://
100 /var/lib/
8.
500 http://
-------
>> sudo dpkg -l mysql-server-8.0
-------
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
iF mysql-server-8.0 8.0.22-
-------
>> sudo apt install --reinstall mysql-server-8.0
-------
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 1 to reinstall, 0 to remove and 0 not to upgrade.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for mysql-server-
-------
>> sudo apt install --reinstall mysql-server
-------
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 1 to reinstall, 0 to remove and 0 not to upgrade.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for mysql-server:amd64
-------
>> sudo dpkg -V mysql-server-8.0
-------
??5?????? c /etc/apparmor.
??5?????? c /etc/mysql/
-------
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: mysql-server 8.0.22-
ProcVersionSign
Uname: Linux 5.4.0-58-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Wed Dec 23 11:51:33 2020
Logs.var.
MySQLConf.
MySQLConf.
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
MySQLConf.
[mysqld_safe]
syslog
MySQLVarLibDirL
PackageArchitec
SourcePackage: mysql-8.0
UpgradeStatus: Upgraded to focal on 2020-10-24 (59 days ago)
modified.
modified.
mtime.conffile.
mtime.conffile.
Hello Poldi and thanks for this bug report. It seems that mysqld can't notify systemd it started because it can't connect to the notification socket:
2020-12- 23T00:42: 48.986520Z 0 [Warning] [MY-011807] [Server] Failed to connect to systemd notification socket named /run/systemd/ notify. Error: 'Permission denied'
The AppArmor profile shipped with mysql-server-8.0 has a specific rule to allow mysqld to connect to /run/systemd/ notify:
# Allow systemd notify messages }run/systemd/ notify w,
/{,var/
however this is missing from the AppArmor profile attached to this bug report. The bug description shows that the profile has been manually modified:
modified. conffile. .etc.apparmor. d.usr.sbin. mysqld: [modified] .etc.apparmor. d.usr.sbin. mysqld: 2017-01- 30T16:55: 00.692188
mtime.conffile.
This is the root of the problem. Purging mysql-server-8.0 (apt purge) and reinstalling it should reinstall the correct AppArmor profile (careful with your existing databases!).
I'm setting this bug report to Incomplete for the moment. If you agree this is a local configuration issue rather than a bug please set its status to Invalid. If you still believe this is a bug in Ubuntu please follow-up with you reasoning and set the bug status back to New, we'll look at it again. Thanks!