MariaDB is a drop-in replacement for MySQL. It is easy to install, offers many speed and performance improvements, and is easy to integrate into most MySQL deployments. Answers for compatibility questions can be found at: MariaDB versus MySQL Compatibility. MariaDB offers more storage engines than MySQL, including Cassandra (NoSQL), XtraDB (drop-in replacement for InnoDB), and OQGRAPH.
- Install MariaDB on Ubuntu 16.04
apt-get update apt-get upgrade
- Installing MariaDB
apt-get install mariadb-serverIf you want to install MariaDB 10.x Which is not included in distribution repository. We going to add MariaDB repo to our system:
sudo apt-get install software-properties-common sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.utexas.edu/mariadb/repo/10.1/ubuntu xenial mainOnce the key is imported and the repository added you can install MariaDB with:
apt-get update apt-get install mariadb-serverOnce complete, you can verify MariaDB is installed by running the below command:
systemctl start mariadb systemctl status mariadb
- Securing MariaDB after installation
mysql_secure_installationConfigure it like this:
- Set root password? [Y/n] y - Remove anonymous users? [Y/n] y - Disallow root login remotely? [Y/n] y - Remove test database and access to it? [Y/n] y - Reload privilege tables now? [Y/n] yTo log into MariaDB, use the following command (note that it’s the same command you would use to log into a MySQL database):
mysql -u root -pCongratulation’s! You have successfully installed MariaDB.