Installing MariaDB on Ubuntu 16.04

MariaDB is a fork of the very popular MySQL database management system; it is now considered as a full drop-in replacement for MySQL.

Installing MariaDB on Ubuntu 16.04
Installing MariaDB on Ubuntu 16.04

Installing MariaDB on Ubuntu 16.04

You can install MariaDB in two ways, using either Ubuntu repository or Official MariaDB mirror.

Installing MariaDB from Ubuntu Repository:

Installing from Ubuntu default repository is a straightforward way, but this may have bit old version of MariaDB.

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

Installing MariaDB from Official Mirror:

MariaDB offers an official installer package for MariaDB; you can choose any one of mirrors from the MariaDB downloads page to download it.

Run below commands in the terminal to configure MariaDB repository straight away.

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 main'

OR

If you don’t wish to use the above commands, you can manually create and update the MariaDB repository file under /etc/apt/sources.list.d/.

sudo nano /etc/apt/sources.list.d/mariadb.list

Place the following entries into the above file.

# MariaDB 10.1 repository list - created 2016-06-18 06:14 UTC
# http://downloads.mariadb.org/mariadb/repositories/
deb [arch=amd64,i386] http://ftp.utexas.edu/mariadb/repo/10.1/ubuntu xenial main
deb-src http://ftp.utexas.edu/mariadb/repo/10.1/ubuntu xenial main

Now, install MariaDB using the following command.

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

Secure MariaDB installation by running mysql_secure_installation.

sudo mysql_secure_installation

Accessing MariaDB:

To access the MariaDB instance, run the following command on the terminal.

mysql -u root -p

Enter the password of root user that you have set during the installation when prompted.

Once after entering the password, you would get a MariaDB shell.

raj@server:~$ mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 10.1.14-MariaDB-1~xenial mariadb.org binary distribution

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

Managing MaraDB:

In case if you want to start / stop the MariaDB; use the following command.

sudo systemctl start mariadb
sudo systemctl stop mariadb

Run the following command in the terminal to check whether MariaDB is running.

sudo systemctl status mariadb

That’s All.

POSTS YOU MAY LIKE -:)

Share This Post

  • 增达信购QQ172607715

    增达信购:边看美女边赚钱,什么不干,坐收百万

    会员权益:

    ①:十级提成自动拿,逆向网赚,不用拉人,坐等收钱

    ②:百万套图打包下,高清无码,永久更新,每日增加

    ③:无限广告任意发,赠送网站,独立域名,极速空间

    【免费注册,立奖一元,网址:】

    http://www.172607715.3i4.com.cn/

  • QQ403867

    增达信购:最嚣张逆向直销网赚,边看美女边赚钱

    会员权益:

    ①:静态分红,每天签到,就有钱赚,高达百元

    ②:十级提成,逆向网赚,不用推广,坐等收钱

    ③:百万套图,高清无水,永久更新,每日增加

    ④:无限广告,赠送网站,独立域名,极速空间

    我每日群发上万,做我下线,什么不干,坐等收钱:

    http://www.403867.3i4.com.cn/

    联系QQ:403867

  • JH

    Thanks! It’s been very helpful.

Shares