{"id":3539,"date":"2019-07-17T20:29:09","date_gmt":"2019-07-17T17:29:09","guid":{"rendered":"https:\/\/kifarunix.com\/?p=3539"},"modified":"2024-03-12T07:33:33","modified_gmt":"2024-03-12T04:33:33","slug":"install-mariadb-10-on-debian-10-buster","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-mariadb-10-on-debian-10-buster\/","title":{"rendered":"Install MariaDB 10 on Debian 10 Buster"},"content":{"rendered":"\n

Welcome to our guide on how to install MariaDB 10 on Debian 10 Buster. As of this writing, MariaDB 10.4<\/a> is the latest stable release.<\/p>\n\n\n\n

Installing MariaDB 10 on Debian 10 Buster<\/h2>\n\n\n\n

In this guide, we are going to install MariaDB 10.4 on Debian Buster. However, the default Debian 10 Buster repositories provides MariaDB 10.3.<\/p>\n\n\n\n

apt policy mariadb-server<\/code><\/pre>\n\n\n\n
mariadb-server:\n  Installed: (none)\n  Candidate: 1:10.3.15-1\n  Version table:\n     1:10.3.15-1 500\n        500 http:\/\/deb.debian.org\/debian buster\/main amd64 Packages<\/code><\/pre>\n\n\n\n

Therefore, to install MariaDB 10.4, you need to create MariaDB APR repo.<\/p>\n\n\n\n

Create MariaDB APT Repo<\/h3>\n\n\n\n

Before you can create MariaDB APT repo, you need to import APT GPG signing key.<\/p>\n\n\n\n

apt install gnupg2 -y\napt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8<\/code><\/pre>\n\n\n\n

Next, create MariaDB APT repo. To create the repo, use the add-apt-repository<\/strong> command. However, this command is not available by default and hence, you need to first install the software-properties-common<\/strong>.<\/p>\n\n\n\n

apt install software-properties-common<\/code><\/pre>\n\n\n\n

After the installation, run the command below to create the MariaDB APT repo.<\/p>\n\n\n\n

Note, you can choose a Mirror that is close to your region on MariaDB repos<\/a>.<\/p>\n\n\n\n

add-apt-repository 'deb [arch=amd64] http:\/\/ftp.igh.cnrs.fr\/pub\/mariadb\/repo\/10.4\/debian buster main'<\/code><\/pre>\n\n\n\n

Run System Update<\/h3>\n\n\n\n

Once the key is imported and the repository added, update the system package cache by executing the following command:<\/p>\n\n\n\n

apt update\napt upgrade<\/code><\/pre>\n\n\n\n

Install MariaDB 10.4 on Debian 10 Buster<\/h3>\n\n\n\n

To install MariaDB 10.4 server and client, run the command below;<\/p>\n\n\n\n

apt install mariadb-server mariadb-client<\/code><\/pre>\n\n\n\n

Running MariaDB 10 on Debian 10 Buster<\/h3>\n\n\n\n

When installation is done, MariaDB is started and enabled to run on system reboot.<\/p>\n\n\n\n

systemctl status mariadb<\/code><\/pre>\n\n\n\n
\u25cf mariadb.service - MariaDB 10.4.6 database server\n   Loaded: loaded (\/lib\/systemd\/system\/mariadb.service; enabled; vendor preset: enabled)\n  Drop-In: \/etc\/systemd\/system\/mariadb.service.d\n           \u2514\u2500migrated-from-my.cnf-settings.conf\n   Active: active (running) since Wed 2019-07-17 13:07:56 EDT; 2min 22s ago\n     Docs: man:mysqld(8)\n           https://mariadb.com\/kb\/en\/library\/systemd\/\n Main PID: 7899 (mysqld)\n   Status: \"Taking your SQL requests now...\"\n    Tasks: 32 (limit: 1150)\n   Memory: 92.2M\n   CGroup: \/system.slice\/mariadb.service\n           \u2514\u25007899 \/usr\/sbin\/mysqld\n\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start[7937]: Phase 6\/7: Checking and upgrading tables\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start[7937]: Running 'mysqlcheck' with connection arguments: --port='3306' --socket='\/var\/run\/mysqld\/mysqld.\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start[7937]: # Connecting to localhost...\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start[7937]: # Disconnecting from localhost...\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start[7937]: Processing databases\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start[7937]: information_schema\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start[7937]: performance_schema\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start[7937]: Phase 7\/7: Running 'FLUSH PRIVILEGES'\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start[7937]: OK\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start[8261]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables<\/code><\/pre>\n\n\n\n

To confirm that MariaDB 10 is enabled on Debian 10;<\/p>\n\n\n\n

systemctl is-enabled mariadb\nenabled<\/code><\/pre>\n\n\n\n

MariaDB 10.4 Authentication<\/h2>\n\n\n\n

By default, MariaDB 10.4 root@localhost<\/strong> user account comes secured. The fact that you were supposed to set and remember the password of MariaDB server root user password no longer exists.<\/p>\n\n\n\n

The root@localhost<\/code> user created with the ability to either use;<\/p>\n\n\n\n