Install MariaDB on Debian 9

Posted by Morgan Billingsley on December 30, 2019 5:52 pm

The best way to install the latest version of MariaDB on any linux distribution is to visit, select your operating system and its version, and then copy and paste the corresponding commands.

Step 1: Download key and repository

sudo apt-get install software-properties-common dirmngr
sudo apt-key adv --recv-keys --keyserver 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] stretch main'

Update apt:

sudo apt update

Step 2: Install MariaDB server

sudo apt-get install mariadb-server

Check to see if MariaDB was installed properly by running:

sudo systemctl status mariadb

You should see something like this:

mariadb.service - MariaDB 10.4.11 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: 
  Drop-In: /etc/systemd/system/mariadb.service.d
   Active: active (running) since Mon XXXX-XX-XX XX:XX:XX UTC; Xh XXmin ago