{"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<p>Welcome to our guide on how to install MariaDB 10 on Debian 10 Buster. As of this writing, <a href=\"https:\/\/downloads.mariadb.org\/mariadb\/10.4.6\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"MariaDB 10.4 (opens in a new tab)\">MariaDB 10.4<\/a> is the latest stable release.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing MariaDB 10 on Debian 10 Buster<\/h2>\n\n\n\n<p>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<pre class=\"wp-block-preformatted\"><code>apt policy mariadb-server<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>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<p>Therefore, to install MariaDB 10.4, you need to create MariaDB APR repo.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Create MariaDB APT Repo<\/h3>\n\n\n\n<p>Before you can create MariaDB APT repo, you need to import APT GPG signing key.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install gnupg2 -y\napt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8<\/code><\/pre>\n\n\n\n<p>Next, create MariaDB APT repo. To create the repo, use the&nbsp;<strong>add-apt-repository<\/strong>&nbsp;command. However, this command is not available by default and hence, you need to first install the&nbsp;<strong>software-properties-common<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install software-properties-common<\/code><\/pre>\n\n\n\n<p>After the installation, run the command below to create the MariaDB APT repo.<\/p>\n\n\n\n<p>Note, you can choose a Mirror that is close to your region on <a href=\"https:\/\/downloads.mariadb.org\/mariadb\/repositories\/#mirror=cnrs\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"MariaDB repos (opens in a new tab)\">MariaDB repos<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>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<h3 class=\"wp-block-heading\">Run System Update<\/h3>\n\n\n\n<p>Once the key is imported and the repository added, update the system package cache by executing the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt update\napt upgrade<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install MariaDB 10.4 on Debian 10 Buster<\/h3>\n\n\n\n<p>To install MariaDB 10.4 server and client, run the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install mariadb-server mariadb-client<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Running MariaDB 10 on Debian 10 Buster<\/h3>\n\n\n\n<p>When installation is done, MariaDB is started and enabled to run on system reboot.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl status mariadb<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\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:&#47;&#47;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&#91;7937]: Phase 6\/7: Checking and upgrading tables\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start&#91;7937]: Running 'mysqlcheck' with connection arguments: --port='3306' --socket='\/var\/run\/mysqld\/mysqld.\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start&#91;7937]: # Connecting to localhost...\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start&#91;7937]: # Disconnecting from localhost...\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start&#91;7937]: Processing databases\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start&#91;7937]: information_schema\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start&#91;7937]: performance_schema\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start&#91;7937]: Phase 7\/7: Running 'FLUSH PRIVILEGES'\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start&#91;7937]: OK\nJul 17 13:07:59 debian10 \/etc\/mysql\/debian-start&#91;8261]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables<\/code><\/pre>\n\n\n\n<p>To confirm that MariaDB 10 is enabled on Debian 10;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl is-enabled mariadb\nenabled<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">MariaDB 10.4 Authentication<\/h2>\n\n\n\n<p>By default, MariaDB 10.4 <strong>root@localhost<\/strong>&nbsp;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<p>The&nbsp;<code>root@localhost<\/code>&nbsp;user created with the ability to either use;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>the&nbsp;<code>unix_socket<\/code>&nbsp;authentication plugin. This allows the the&nbsp;<code>root@localhost<\/code>&nbsp;user to login without a password via the local Unix socket as long as the login is attempted from a process owned by the operating system&nbsp;<code>root<\/code>&nbsp;user account.<\/li>\n\n\n\n<li>use the&nbsp;<code>mysql_native_password<\/code>&nbsp;authentication plugin if&nbsp;<code>unix_socket<\/code>&nbsp;authentication plugin fails. An invalid password is however initially set and thus, you need to set the password with the usual&nbsp;<code>SET PASSWORD<\/code>&nbsp;statement before this method can work.<\/li>\n<\/ul>\n\n\n\n<p>As a result, you can simply login to MariaDB 10.4 by just using&nbsp;<strong>mysql<\/strong>&nbsp;or&nbsp;<strong>mysql -u root<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mysql -u root<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Welcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MariaDB connection id is 46\nServer version: 10.4.6-MariaDB-1:10.4.6+maria~buster-log mariadb.org binary distribution\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMariaDB &#91;(none)]&gt;<\/code><\/pre>\n\n\n\n<p>If you however need to set the root password, login to MariaDB as in above and execute the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ALTER USER root@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD(\"StronGP@SS\");<\/code><\/pre>\n\n\n\n<p>You can now natively login as;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<p>To read more about MariaDB 10.4 authentications, check the <a rel=\"noreferrer noopener\" aria-label=\"Authentication for MariaDB 10.4 page (opens in a new tab)\" href=\"https:\/\/mariadb.com\/kb\/en\/library\/authentication-from-mariadb-104\/https:\/\/mariadb.com\/kb\/en\/library\/authentication-from-mariadb-104\/\" target=\"_blank\">Authentication for MariaDB 10.4 page<\/a>.<\/p>\n\n\n\n<p>Well, that is it on how to installing MariaDB 10.4 on Debian 10 Buster<\/p>\n\n\n\n<p>You can check our related tutorials by following the links below;<\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/kifarunix.com\/install-mysql-8-on-freebsd-12\/\" target=\"_blank\">Install MySQL 8 on FreeBSD 12<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-mysql-8-on-debian-9\/\">Install MySQL 8 on Debian 9<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-mysql-8-on-fedora-30-fedora-29\/\">Install MySQL 8 on Fedora 30\/Fedora 29<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-lemp-stack-with-mysql-8-on-fedora-30-fedora-29\/\">Install LEMP Stack with MySQL 8 on Fedora 30\/Fedora 29<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-mariadb-10-4-on-ubuntu-18-04-debian-9\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install MariaDB 10.4 on Ubuntu 18.04\/Debian 9<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to our guide on how to install MariaDB 10 on Debian 10 Buster. As of this writing, MariaDB 10.4 is the latest stable release.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,299,928],"tags":[1000,1039,136,1024],"class_list":["post-3539","post","type-post","status-publish","format-standard","hentry","category-howtos","category-database","category-mariadb","tag-database","tag-debian-10-buster","tag-mariadb","tag-mariadb-10-4","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3539"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=3539"}],"version-history":[{"count":6,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3539\/revisions"}],"predecessor-version":[{"id":21173,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3539\/revisions\/21173"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=3539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=3539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=3539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}