Install MariaDB Server 10.0 on Ubuntu 14.04 LTS ( Trusty Tahr )

The post will explain, how to install MariaDB Server 10.0 on Ubuntu 14.04 LTS (Trusty Tahr) . MariaDB which is now a days very popular. It is fork of MySQL and best alternate of MySQL. Red Hat has already announced the MariaDB as default Database in Verion RHEL 7.0.

I surely suggest you to know about the history of MariaDB. The best reference which I always find is Wikipedia pages.

MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. Being a fork of a leading open source software system, it is notable for being led by the original developers of MySQL, who forked it due to concerns over its acquisition by Oracle. Contributors are required to share their copyright with the MariaDB Foundation (Reference from Wikipedia)

Install MariaDB Server On Ubuntu 14.04 LTS

Installing MariaDB server is quite easy. We are doing this practical on freshly installed Ubuntu 14.04 LTS Operating System.

Follow the given below steps to install MariaDB server version 10.0 .

Step 1 : Add apt repository

Add the MariaDB repository information in apt. For this run the below given command.

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp:// 0xcbcb082a1bb943db
sudo add-apt-repository 'deb trusty main'

Step 2: Update apt and install MariaDB Server

Run the below given command for installing MariaDB server.

sudo apt-get update
sudo apt-get install mariadb-server

While installation on screen you can see, it is asking for setting MariaDB root password.
Give strong password for MariaDB Server.

MariaDB Server 10.0.14

MariaDB Server

After installation you can directly login into MariaDB server. Because bydefault the service will be running. It is important to note that here the service name is MySQL .

To login into MariaDB server as root, use the below given command.

mysql -u root -p

See the below given screenshot from my system as reference.
In below screenshot you can see the MariaDB [(none)]> console, through which you can also easily identify it is MariaDB Server.


How to start/stop/status/restart MariaDB service

To start the MariaDB Server, run the command

sudo service mysql start

To stop the MariaDB Server, run the command

sudo service mysql stop

To restart the MariaDB Server, run the command

sudo service mysql restart

To get running status, run the below given command

 sudo service mysql status

Check which port MariaDB server is listening

In this section we will use two command ss and netstat to find the listening port by MariaDB server.

As we know, service name is mysql. We will use the ss command here, it is nice alternate of netstat command.

ByDefault MariaDB server use the port no. 3306

sudo ss -ltnp|grep mysql

See the below reference from my system

sharad@ubuntu:~$ sudo ss -ltnp|grep mysql
LISTEN     0      100                          *:*      users:(("mysqld",3667,21))

In case, you want to use netstat command to check listening port, run the below command

netstat -tanp|grep 3306






Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.