Co-installation of mysql and mariadb can cause 'Link has been severed' failure on mysql.service when purging
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-8.0 (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
dpkg: error processing package mysql-server-8.0 (--remove):
installed mysql-server-8.0 package pre-removal script subprocess returned error
exit status 1
dpkg: too many errors, stopping
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
Failed to preset unit: File mysql.service: Link has been severed
/usr/bin/
such file or directory
Failed to start mysql.service: Unit mysql.service not found.
invoke-rc.d: initscript mysql, action "start" failed.
Unit mysql.service could not be found.
dpkg: error while cleaning up:
installed mysql-server-8.0 package post-installation script subprocess returned
error exit status 1
Errors were encountered while processing:
mysql-server-8.0
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
ProblemType: Package
DistroRelease: Ubuntu 20.10
Package: mysql-server-8.0 8.0.25-
ProcVersionSign
Uname: Linux 5.8.0-53-generic x86_64
ApportVersion: 2.20.11-0ubuntu50.6
Architecture: amd64
CasperMD5CheckR
Date: Tue May 18 09:59:53 2021
ErrorMessage: installed mysql-server-8.0 package pre-removal script subprocess returned error exit status 1
InstallationDate: Installed on 2020-03-02 (442 days ago)
InstallationMedia: Ubuntu 18.04.4 LTS "Bionic Beaver" - Release amd64 (20200203.1)
Logs.var.
MySQLConf.
MySQLConf.
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
MySQLVarLibDirL
ProcCmdline: BOOT_IMAGE=
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
RelatedPackageV
dpkg 1.20.5ubuntu2
apt 2.1.10ubuntu0.3
SourcePackage: mysql-8.0
Title: package mysql-server-8.0 8.0.25-
UpgradeStatus: Upgraded to groovy on 2021-05-17 (0 days ago)
summary: |
- package mysql-server-8.0 8.0.25-0ubuntu0.20.10.1 failed to - install/upgrade: installed mysql-server-8.0 package pre-removal script - subprocess returned error exit status 1 + Co-installation of mysql and mariadb can cause 'Link has been severed' + failure on mysql.service when purging |
Thank you for taking the time to file a bug report.
Based on the logs you posted, it seems like you have both MySQL and MariaDB installed in the system. This scenario is not really supported and can lead to errors, especially during the upgrade/removal processes, which is your case. It seems like you tried purging the MySQL packages *after* having installed MariaDB. Could you please try doing the opposite? First, purge MySQL and make sure that there is no mysql-server daemon running. Then, install MariaDB.
If you still experience problems doing this, please let us know and try to provide as much detail as you can so that we can attempt to reproduce the issue.
Since it seems likely to me that this is a local configuration problem,
rather than a bug in Ubuntu, I am marking this bug as 'Incomplete'.
However, if you believe that this is really a bug in Ubuntu, then we would
be grateful if you would provide a more complete description of the problem
with steps to reproduce, explain why you believe this is a bug in Ubuntu
rather than a problem specific to your system, and then change the bug
status back to "New".
For local configuration issues, you can find assistance here: www.ubuntu. com/support/ community
http://