How to Install MariaDB 10.1 on Debian 8

MariaDB 10.1 is the latest stable release and some interesting new features it implemented are as follows:

  • built-in galera cluster support which is a true multi-master replication solution
  • Data on disk is encrypted.
  • optimistic parallel replication
  • InnoDB/XtraDB page compression and page compression for FusionIO

For the full list of new features, go to official knowledge base.  The repository of Debian 8 only has MariaDB 10.0. So in this tutorial, I will show you how to install MariaDB 10.1 on Debian 8 step by step.

Install MariaDB 10.1 on Debian 8

First we will install the command line software sources manager named software-properties-common. It gives us the ability to use the add-apt-repository utility. The graphical counterpart is called software-properties-gtk. Now we only need the command line version.

sudo apt-get install -y software-properties-common

Then import MariaDB signing key with apt-key so apt can verify downloaded packages from MariaDB.

sudo apt-key adv --recv-keys --keyserver 0xcbcb082a1bb943db

Now we can use add-apt-repository to add the repository. [arch=amd64,i386] specifies that we only need amd64 and i386 architecture.

sudo add-apt-repository 'deb [arch=amd64,i386] jessie main'

After that is done, update local package index and install mariadb-server.

sudo apt-get update;sudo apt-get install mariadb-server

During the installation phase, you will be asked to set a password for the MariaDB adminstrative root user. You need to type the new password twice.

Install MariaDB 10.1 on Debian 8

After the installation is completed, MariaDB server will be automatcially started.

sudo systemctl status mariadb      or       sudo systemctl status mysqld


● mariadb.service - MariaDB database server
    Loaded: loaded (/lib/systemd/system/mariadb.service; enabled)
   Drop-In: /etc/systemd/system/mariadb.service.d
    Active: active (running) since Sat 2016-03-19 01:49:08 EDT; 1min 28s ago
  Main PID: 18104 (mysqld)
    Status: "Taking your SQL requests now..."
    CGroup: /system.slice/mariadb.service
            └─18104 /usr/sbin/mysqld

Check MariaDB version.

mysql --verison

Install MariaDB 10.1 on Debian 8

You can also see the version number when you login with mysql client.

mysql -u root -p

Install MariaDB 10.1 on Debian 8

Finally, for security, we should run the post installation script.

sudo mysql_secure_installation

This script allows us to remove anonymous user, disable root remote login and remove test database for maximal security.

Rate this tutorial
[Total: 9 Average: 4.7]

One Response to “How to Install MariaDB 10.1 on Debian 8

  • Dan Boyle
    6 years ago

    This doesn’t work.

    The following packages have unmet dependencies:
    mariadb-client : Depends: mariadb-client-10.1 (= 10.1.22+maria-1~sid) but it is not going to be installed
    mariadb-server : Depends: mariadb-server-10.1 (= 10.1.22+maria-1~sid) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community ( for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here