How to Drop-In replace MySQL with MariaDB?
It turned out to be as simple as:
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install mariadb-server
This won't break your phpmyadmin, or any webapp, as long as you say no, when asked if you want to delete your database and you use the same credentials you used for you mysql-DB. Also back up your data before doing this.
Andreas Hartmann's answer is incomplete, and it also removes PHPMYADMIN and MYSQLI
So, in addition to mariadb-server, you should install the following:
apt-get install mariadb-client libmariadbclient-dev libmariadbd-dev phpmyadmin
To get phpMyAdmin working again on SSL only, you'll need to reconfigure etc/phpmyadmin/apache.conf to include the http=>https rewrite.
If you're running a LAMP server with Postfix with Dovecot, you will also need to do the following:
**** Everything worked except MAIL. Dovecot not configured properly and can’t send/receive mail.
apt-get install dovecot-mysql fixed mail receipt but sending is still blocked.
apt-get install libclass-dbi-mysql-perl
apt-get install php-auth
apt-get install php-pear
apt-get install postfix-mysql
**** EVERYTHING WORKING FINE HERE
The last three (3) apt-get statements might not be necessary, since libclass-dbi-mysql-perl might install them for you, depending on how update your package list is.
If you are running other software, you will need to test it and install any missing libraries that might have been removed by auto-dependency calculations.
Update
The FTP service was removed as well (PureFTPD in my case) and needed to be installed:
apt-get install pure-ftpd-common pure-ftpd-mysql