Something I've seen stump users (including myself) is that Apt won't allow both MySQL and MariaDB to be installed. For instance, here's a nearly 3-year-old AskUbuntu question on the topic, still unanswered.
As a concrete description of the problem, consider Ubuntu 22.04. If I have MySQL installed using Apt, and I then attempt to install the MariaDB package, Apt will demand the removal of MySQL:
# MySQL 8.0 is installed:
$ apt-cache policy mysql-server-8.0
mysql-server-8.0:
Installed: 8.0.30-0ubuntu0.22.04.1
Candidate: 8.0.30-0ubuntu0.22.04.1
...
MariaDB 10.6 is not installed:
$ apt-cache policy mariadb-server-10.6
mariadb-server-10.6:
Installed: (none)
Candidate: 1:10.6.7-2ubuntu1.1
...
Attempt to install MariaDB 10.6:
$ sudo apt install mariadb-server-10.6
...
The following additional packages will be installed:
galera-4 gawk libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl
libsigsegv2 libterm-readkey-perl mariadb-client-10.6
mariadb-client-core-10.6 mariadb-server-core-10.6
...
MySQL packages are removed:
The following packages will be REMOVED:
mysql-client-8.0 mysql-client-core-8.0 mysql-server mysql-server-8.0
mysql-server-core-8.0
...
I've never heard anyone give a good reason for this. MySQL and MariaDB are quite similar, but that doesn't automatically preclude them from co-existing. In fact, multiple versions of MySQL itself can co-exist on the same machine, as explained by MySQL. And as explained by MariaDB, there's no reason one of those multiple versions can't be an instance of MariaDB.
So if there's no fundamental reason I can't have MySQL and MariaDB installed at the same time, why does Apt insist on treating these as mutually exclusive?
/var/lib/mysql
and/etc/my.conf
. Mariadb is a drop in replacement so for all intent and purpose you need to see MariaDB as another MySQL version. – Rinzwind Sep 10 '22 at 18:22