Comment 2 for bug 1889328

Revision history for this message
Paride Legovini (paride) wrote :

Thanks for this bug report. The problem can be reproduced by running the following in a fresh Focal LXD container:

  apt update
  apt install mariadb-server
  apt remove mariadb-server
  apt install mysql-server

At this point mysql is in a very broken state. Its systemd units looks masked:

  # systemctl status mysql
  Unit mysql.service could not be found.

and this is why trying to remove it with:

  apt remove mysql-server-8.0

fails, as the uninstall process tried to `systemctl stop` the service. This is the error this bug report is about, but it's worse. If at this point we purge mariadb:

  apt purge mariadb-server-10.3

it will also delete the mysql user, which at this point should be "owned" by mysql - and possibly other things.

It seems that a Conflicts relationship between the two packages is not strong enough. Maybe Breaks could avoid this?