{"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 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 Therefore, to install MariaDB 10.4, you need to create MariaDB APR repo.<\/p>\n\n\n\n Before you can create MariaDB APT repo, you need to import APT GPG signing key.<\/p>\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 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 Once the key is imported and the repository added, update the system package cache by executing the following command:<\/p>\n\n\n\n To install MariaDB 10.4 server and client, run the command below;<\/p>\n\n\n\n When installation is done, MariaDB is started and enabled to run on system reboot.<\/p>\n\n\n\n To confirm that MariaDB 10 is enabled on Debian 10;<\/p>\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 As a result, you can simply login to MariaDB 10.4 by just using mysql<\/strong> or mysql -u root<\/strong>.<\/p>\n\n\n\n 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 You can now natively login as;<\/p>\n\n\n\n To read more about MariaDB 10.4 authentications, check the Authentication for MariaDB 10.4 page<\/a>.<\/p>\n\n\n\n Well, that is it on how to installing MariaDB 10.4 on Debian 10 Buster<\/p>\n\n\n\n You can check our related tutorials by following the links below;<\/p>\n\n\n\n Install MySQL 8 on FreeBSD 12<\/a><\/p>\n\n\n\n Install MySQL 8 on Debian 9<\/a><\/p>\n\n\n\n Install MySQL 8 on Fedora 30\/Fedora 29<\/a><\/p>\n\n\n\n Install LEMP Stack with MySQL 8 on Fedora 30\/Fedora 29<\/a><\/p>\n\n\n\nInstalling MariaDB 10 on Debian 10 Buster<\/h2>\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
Create MariaDB APT Repo<\/h3>\n\n\n\n
apt install gnupg2 -y\napt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8<\/code><\/pre>\n\n\n\n
apt install software-properties-common<\/code><\/pre>\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
apt update\napt upgrade<\/code><\/pre>\n\n\n\n
Install MariaDB 10.4 on Debian 10 Buster<\/h3>\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
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
systemctl is-enabled mariadb\nenabled<\/code><\/pre>\n\n\n\n
MariaDB 10.4 Authentication<\/h2>\n\n\n\n
root@localhost<\/code> user created with the ability to either use;<\/p>\n\n\n\n
\n
unix_socket<\/code> authentication plugin. This allows the the
root@localhost<\/code> 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
root<\/code> user account.<\/li>\n\n\n\n
mysql_native_password<\/code> authentication plugin if
unix_socket<\/code> authentication plugin fails. An invalid password is however initially set and thus, you need to set the password with the usual
SET PASSWORD<\/code> statement before this method can work.<\/li>\n<\/ul>\n\n\n\n
mysql -u root<\/code><\/pre>\n\n\n\n
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 [(none)]><\/code><\/pre>\n\n\n\n
ALTER USER root@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD(\"StronGP@SS\");<\/code><\/pre>\n\n\n\n
mysql -u root -p<\/code><\/pre>\n\n\n\n