How to install MariaDB on Debian 10 Buster


MariaDB is a popular open source database server that is developed by some of the original developers of MySQL and it includes numerous enhancements over standard MySQL. It is the default database server in Debian Buster and is a drop-in replacement for MySQL (although you might want to double check MariaDB vs MySQL compatibility before migrating from MySQL to MariaDB).

This how-to guide will show you how to easily install MariaDB on Debian 10 using the main Debian Buster repository.

Install MariaDB Server on Debian 10 (Buster)

Update your Debian package list

First you’ll want to update the Debian Buster package list with

sudo apt update

Install MariaDB on Debian 10 Buster

Now that you have your Debian package list updated, you can begin the install of the MariaDB packages with the following command

sudo apt install mariadb-server

Verify that MariaDB is installed and running

Once apt is finished installing mariadb-server you can verify that it is installed and running by using this command

sudo systemctl status mysql

You can test out logging in to your new MariaDB server install by using the following command

sudo mysql -u root

and you can exit MariaDB by simply typing


Secure by default

On Debian 10 Buster MariaDB comes secure by default so you do not need to run mysql_secure_installation. It also does not use a root password anymore and instead uses the unix socket authentication plugin. You can find out more information about the unix socket authentication plugin here.

Tuning MariaDB

If you would like to change/tune MariaDB’s default settings, you can find the server configuration file at:


MariaDB’s website has a comprehensive list of settings you can tune on this page.


Congratulations! You have hopefully installed MariaDB on Debian 10 successfully. If you have any questions or need any help then please don’t hesitate to leave a comment below and I’ll do my best to answer any questions you may have.

Leave a Reply

Your email address will not be published. Required fields are marked *