How To install mariaDB on Ubuntu 16.04

September 15, 2016

How To install mariaDB on Ubuntu 16.04

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

First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

  • Installing MariaDB

Installing MariaDB is as simple as running just one command below:

If you want to install MariaDB 10.x Which is not included in distribution repository. We going to add MariaDB repo to our system:

Once the key is imported and the repository added you can install MariaDB with:

Once complete, you can verify MariaDB is installed by running the below command:

  • Securing MariaDB after installation

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:

Configure it like this:

To log into MariaDB, use the following command (note that it’s the same command you would use to log into a MySQL database):

Congratulation’s! You have successfully installed MariaDB.