Linux Mint

How to install Mariadb on Linux Mint 21

MariaDB is a free, reliable, and most popular user-friendly database management system developed by SQL developers. It can run on many operating systems including Windows, macOS and Linux. If you need a better relational database management system MariaDB should be selected. The updated version of MariaDB server comes with the features of scalability and high performance.

How to Install MariaDB on Linux Mint 21

To Install MariaDB server on Linux Mint 21 system, few steps are required to execute.

Step 1: The first steps before installing the MariaDB server is to update apt repository to refresh system packages:

$ sudo apt update

Step 2: Once your package list updated, it’s a time to install MariaDB server on system by running following command:

$ sudo apt install mariadb-server

Step 3: Confirm the status of MariaDB server after installing it on Linux system through command:

$ sudo systemctl status mariadb

This active status shows in the above screenshot that MariaDB is active and running successfully in the background.

Step 4: Our next step is to check if we have installed the updated version of MariaDB server or not. For this, the command would be:

$ mariadb --version

Step 5: It is recommended to provide security to MariaDB server but this step is optional. If you want to secure server then run the mentioned command:

$ sudo mysql_secure_installation

While executing this command, the system will ask you to enter a password, as you can install this as a root user. Enter your password and hit Enter:

When you enter password, it will ask you questions, answer them accordingly:

Once you done with the answers, you will get the following response:

Step 6: Now, you can make successful connection to MariaDB server by the help of given command:

$ mysql -u root -p

Step 7: Run the help command to get better understanding of MariaDB server on Linux system:

$ mariadb --help

How to Remove MariaDB from Linux Mint 21

To remove MariaDB server from Linux Mint 21 system, run the command:

$ sudo apt remove mariadb-server

Conclusion

MariaDB is popular among developers as it’s a replacement of SQL and comes with more reliable and user-friendly features. MariaDB is faster than SQL in several ways, especially performing queries or replication. This article has described the step-by-step procedure to install MariaDB server including its configuration process and how we can delete it from the Linux system.

About the author

Syeda 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.