How to Install or Upgrade to MariaDB 10.1, 10.2 and 10.3 on Ubuntu Linux

|

|

MariaDB, an open-source server and fork of MySQL, is quickly becoming a preferred choice on Linux systems. This post provides instructions for installing MariaDB 10.2 or 10.3 on Ubuntu 16.04 LTS. As Ubuntu’s default repository only supports MariaDB 10.1, the article guides users through the process of adding a specific MariaDB repository. Installation, including setting…

This article explains upgrading the MariaDB database on Ubuntu Linux

Upgrading the MariaDB database on Ubuntu Linux can provide several benefits. Firstly, upgrading to the latest version ensures that you have access to the latest features and bug fixes, which can improve the performance and stability of your database server.

Additionally, upgrading to MariaDB database on Linux can help you take advantage of its improved scalability and flexibility, making it easier to manage complex databases and applications.

Finally, as MariaDB is an open-source server rapidly overtaking MySQL as the database server of choice on Linux systems, upgrading to it can ensure that you use a reliable and well-supported database server for your applications.

When you’re ready to install MariaDB latest, follow the steps below:

Adding MariaDB repository on Ubuntu

First, make sure the software-properties-common package is installed. Then, just in case it’s not, run the commands below.

sudo apt-get install software-properties-common

Next, run the commands below to import the MariaDB repository public key used by the package management system.

sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8

Finally, run the commands below to add MariaDB 10.1 repository to your Ubuntu machine.

sudo sh -c "echo 'deb https://mirrors.evowise.com/mariadb/repo/10.1/ubuntu '$(lsb_release -cs)' main' > /etc/apt/sources.list.d/MariaDB101.list"

The above commands add MariaDB 10.1 repository to Ubuntu with the latest packages. Remember to change the highlighted version number to the current version.

To install MariaDB 10.2, run the commands below.

sudo sh -c "echo 'deb https://mirrors.evowise.com/mariadb/repo/10.2/ubuntu '$(lsb_release -cs)' main' > /etc/apt/sources.list.d/MariaDB102.list"

At the time of this writing, the latest current version was 10.2. The newest alpha version was 10.3

It’s recommended to upgrade to 10.1 before moving to 10.2 and up.

Installing MariaDB latest on Ubuntu

Now that the MariaDB 10.1 repository has been added to Ubuntu run the guides below to install the current version.

First, run the commands below to update your Ubuntu machines.

sudo apt-get update

Next, run the commands below to install the MariaDB server and client.

sudo apt-get install mariadb-server mariadb-client

During the installation, you may be prompted to create and confirm a new password for the MariaDB root user.

Please enter and confirm a password. You’ll need this password to manage the database server.

After that, MariaDB will be fully installed on your machine.

To secure the MariaDB database server, run the commands below:

mysql_secure_installation

When you run the above command, you’ll be prompted to create a root password, remove anonymous users, restrict remote root access, and delete the test database.

Follow this guide below to answer the questions:

  • Enter current password for root (enter for none): Enter current password.
  • Change root password? N
  • Remove anonymous users? Y
  • Disallow root login remotely? Y
  • Remove test database and access to it? Y
  • Reload privilege tables now? Y

When you’re done, restart MariaDB, and you’re done.

That’s it!

To verify the MariaDB version, run the command below

mysql -V
mysql Ver 15.1 Distrib 10.2.12-MariaDB, for debian-linux-gnu (i686) using readline 5.2

That’s it!

You may also like the post below:

Like this:



2 responses to “How to Install or Upgrade to MariaDB 10.1, 10.2 and 10.3 on Ubuntu Linux”

  1. Carlos Avatar
    Carlos

    Here are the commands to run to install MariaDB 10.3 from the MariaDB repository on your Ubuntu system:

    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,arm64,ppc64el] http://mirror.its.dal.ca/mariadb/repo/10.3/ubuntu bionic main’

    sudo apt-get install mariadb-server mariadb-client

  2. Jackson Avatar
    Jackson

    In the event you don’t have a display person, you’ll need certainly to download that,
    but otherwise, each game are at your convenience with no hassle of duplicating it to your pc.

Leave a Reply to Jackson Cancel 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.