In this tutorial we will show you how to install MariaDB on Debian 10. For those of you who didn’t know, MariaDB is a multi-thread, open-source relational database management system, a perfect replacement of MySQL database system. MariaDB maintained and developed by the MariaDB Foundation, including some of the MySQL developers.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation MariaDB database management system on a Debian 10 (Buster) server.
Install MariaDB on Debian 10
Step 1. Before we install any software, it’s important to make sure your system is up to date by running these following apt commands in the terminal:
Once the repositories package list updated in your system, you can start the MariaDB installation using below command:
After complete, you can verify MariaDB is installed by running the below command:
By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:
Configure it like this:
Once you have secured your MariaDB installation, you can connect to mysql shell using the root user password:
To create a database named “idroot_db” and a user named “idroot_user” with full privileges to manage the database run the following SQL commands:
Congratulation’s! You have successfully installed MariaDB. Thanks for using this tutorial for installing MariaDB database management system on Debian 10 (Buster). For additional help or useful information, we recommend you to check the official MariaDB website.