On Ubuntu 16.04/15.10/15.04:
sudo systemctl status mysql
if you want to install MariaDB on your system first you have to uninstall existing mysql. Follow these steps to uninstall completely existing MySQL from server.
sudo systemctl stop mysql
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /etc/mysql/
When MySQL in uninstalled completely then run the following command to install MariaDB.
Install MariaDB
sudo apt-get install aptitude
sudo aptitude install mariadb-server-10.4
sudo systemctl status mysql