How to Install MariaDB on Ubuntu 20.04

MariaDB is a popular, fast, scalable, and robust open-source database server developed by the developers of MySQL as an enhanced drop-in replacement to the MySQL server. With a variety of plugins and tools to exaggerate its features and its widespread popularity, even large companies, such as Google, Wikipedia, and, are well-known users of MariaDB.

Installing MariaDB on Ubuntu 20.04

Follow the steps provided in the following process to install the MariaDB server on your Ubuntu 20.04 system:

Open the terminal in Ubuntu using the Ctrl+Alt+T shortcut.

Use the following command to update the list of all packages in the system:

$ sudo apt update

All packages are updated. To begin the installation process, issue the following command:

$ sudo apt install mariadb-server

After completing the installation process, check the status of the database server with the following command:

$ sudo systemctl status mariadb

As you can see, the green mark is visible and the current status is active in my system. If the status is disabled for some reason, use the command given below to activate the status:

$ sudo systemctl enable mariadb

Execute the following command to check the version of the MariaDB server:

$ mysql –V

For secure installation of the MariaDB server, use the following command:

$ sudo mysql_secure_installation

Set the password and manage other settings shown in the image according to your requirements:


MariaDB is a server developed by the developers of MySQL with versatile properties of plugins and tools. This article provided a brief introduction to the MariaDB server and the steps needed to install the server on Ubuntu 20.04.

About the author

Wardah Batool

I am a Software Engineer Graduate and Self Motivated Linux writer. I also love to read latest Linux books. Moreover, in my free time, i love to read books on Personal development.