Customers Contact TR

What is MariaDB, How to Install it on Ubuntu 14.04

MariaDB is an RDBMS (Relational Database Management System), developed by forking from MySQL.


Sun bought MySQL, and then Oracle acquired Sun. It indicated that Oracle’s decisions would shape MySQL from then on. Initial developers of MySQL forked MySQL while under the “Monty AB” roof and developed it as free software. The journey has continued with the new name MariaDB.


Features at a Glance:

* It is licensed with the GNU General Public License.

* Monty Widenius, the creator of MySQL, named her second daughter after MariaDB. (Monty’s first daughter’s name is My.)

* There is community support behind all improvements and maintenance.

* MariaDB, a replication of MySQL, recognizes all MySQL commands and supports MySQL interface methods. Both libraries share standard codes.

* Google, English Wikipedia, and WordPress use MariaDB.


Additional Features:

– Faster and secure replication with “group commit” (ACID)

– No unnecessary character encoding transformations; increased speed

– Plug-in validation structure

– Virtual, and there is a dynamic column for each row

– Comprehensive user statistics


Other MySQL Forks

Drizzle: Aims a smaller, lighter, and faster MySQL for cloud

Percona: One-to-one compatible with MySQL, aims for better statistics, performance, and stability

OurDelta: A patch set for MySQL and MariaDB


Installing MariaDB on Ubuntu 14.04:


Firstly, we need to install the software-properties-common package for MariaDB.


$sudo apt-get install software-properties-common


Then we need to add the key to MariaDB’s package repository.


$sudo apt-key adv –recv-keys –keyserver hkp://


Afterward, we need to add MariaDB’s package repository.


$sudo add-apt-repository ‘deb main’


We should update our local package repository.


$sudo apt-get update


Now we can download the package.


$sudo apt-get install mariadb-server


To create the MariaDB structure, we should stop the running MySQL and then say “mysql_install_db”. Let’s restart.


$sudo service mysql stop

$sudo mysql_install_db

$sudo service mysql start


After the structure is created, we should say “mysql_secure_installation” to create test tables and anonymous users. We should then do configurations according to the few questions in the command output.


$sudo mysql_secure_installation


“”””””In order to log into MariaDB to secure it, we’ll need the current password for the root user. If you’ve just installed MariaDB, and you haven’t set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none):

OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation.

You already have a root password set, so you can safely answer ‘n’.

Change the root password? [Y/n] y

New password:

Re-enter new password:

Password updated successfully!

Reloading privilege tables..

… Success!

By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them.

It is intended only for testing, and to make the installation go a bit smoother. You should remove those before moving into a production environment.

Remove anonymous users? [Y/n]

… Success!

Normally, root should only be allowed to connect from ‘localhost’. This ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n]

… Success!

By default, MariaDB comes with a database named ‘test’ that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment.

Remove test database and access to it? [Y/n]

– Dropping test database…

… Success!

– Removing privileges on test database…

… Success!

Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n]

… Success!

Cleaning up…

All done! If you’ve completed all of the above steps, your MariaDB installation should now be secure.

Thanks for using MariaDB!”””””””


To check the MariaDB version:


To connect to the MariaDB console:


To see what we can do with MariaDB:


** You can check MariaDB projects from here.

Author: Kartaca