how to install mariadb on centos 6

September 8, 2016

install mariadb on centos

MariaDB is a binary drop-in replacement for MySQL, developed by original authors of MySQL Project and fully compatible with MySQL having more features and better performance enhancement. Till we wrote this post,MariaDB 10.0 Series is the development version (Alpha) and MariaDB 5.5 is the current stable (GA) release.

As we all know MySQL is widely used and the most popular RDBMS and first choice of developers. In 2008,MySQL was acquired by Sun Microsystem, which was subsequently bought by Oracle and which is no longer open source.

Well, MariaDB is sponsored by Monty Program AB & MariaDB Foundation and is independently developed by the core developer of MySQL and other community members and truly open source. The man who created MySQLdatabase by MichaelMontyWidenius, David Axmark, and Allan Larsso the founder of MySQL and Monty Program AB is now behind MariaDB. They would oversee the development of MariaDB foundation.

First, ensure the list of available packages is up-to-date before installing. Open your SSH terminal and input the following commands.


Add the MariaDB repository.


For 32-bit users, paste the following text:


For 64-bit users, paste the following text:


Save the


Install software

At this point, installing MariaDB is as simple as running just one command.


Once the installation completes, start MariaDB.


Next, set MariaDB to start on every boot.


Secure MariaDB

Secure your MariaDB installation. The following checklist shows the steps that will be performed.

  • Set (Change) root password.
  • Remove anonymous users.
  • Disallow root login remotely.
  • Remove test database and access to it.
  • Reload privilege tables.

Run the secure installation command.


Example output


Restart MariaDB.


You can connect to MariaDB by using following command.


Congratulations, you have successfully installed MariaDB on CentOS 6. Enjoy!