How To Install & Configure MariaDB 10.6 on Ubuntu 20.04 LTS (Focal Fossa)

Mdb

On this today tutorial we will teach you on how to install and configure the latest stable version of MariaDB 10.6 database server on Ubuntu 20.04 LTS (Focal Fossa).

MariaDB is a open source database server as a fork and drop-in-replacement for MySQL. It’s free to use, so you can distribute and modify the code without license restrictions. MariaDB is distributed under GPLv2 license.

Kindly follow this tutorial, so I can teach you on how to deploy MariaDB 10.6 on Ubuntu 20.04 LTS. This is very easy and you can do it in a few step.

PREREQUISITES:

* VPS / Cloud / Bare Metal
* Ubuntu 20.04 LTS (Focal Fossa) x86_64
* Superuser Privileges (Root Access)
* Server IPv4 Address
* Password Root
* gNome Terminal for Linux Desktop
* PuTTy SSH Client for Windows/Mac

1.) Firts of all, simply choose your distribution version of operation system that you’ve been used on your virtual machine or cloud. Then, just add MariaDB 10.6 repository on your VM with the following steps.

$ apt-get install software-properties-common dirmngr apt-transport-https
$ apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
$ add-apt-repository 'deb [arch=amd64,arm64,ppc64el,s390x] https://mirror.poliwangi.ac.id/mariadb/repo/10.6/ubuntu focal main'

Please note that on this step we use Politeknik Negeri Banyuwangi for Mirror.

2.) Or you can create a file called MariaDB.list under “/etc/apt/sources.list.d” directory and then simpy put the following snippet code on that file.

------------------------------------------------------------------------------
# MariaDB 10.6 repository list - created UTC
# https://mariadb.org/download/
deb [arch=amd64,arm64,ppc64el,s390x] https://mirror.poliwangi.ac.id/mariadb/repo/10.6/ubuntu focal main
deb-src https://mirror.poliwangi.ac.id/mariadb/repo/10.6/ubuntu focal main
------------------------------------------------------------------------------

3.) After that simply run system update on your Ubuntu machine. So, we can get the latest available package from the MariaDB repository.

$ apt update

4.) From this step we can continue to install MariaDB 10.6 database server on your virtual machine. Just run the following command.

$ apt install mariadb-server

5.) After we’ve MariaDB 10.6 installed on your machine, we can securing MariaDB installation with the following command. Then just follow securing command in a few step.

$ mysql_secure_installation

6.) You can verify your MariaDB version with this commands.

$ mysql -V