MariaDB is a popular and widely used data-based server introduced as an ideal alternative to MySQL server. You can use this database system to create a web server or develop applications. Several cloud-based servers consider the MariaDB database as a top performance because of its easy setup features that can be performed by a beginner as well.
As a Debian user, you can install MariaDB on the system from this article’s guidelines.
How to Install MariaDB on Debian
To install MariaDB on Debian, you must follow the steps given below:
Step 1: Update the Debian Repository
First, it’s good to update the Debian repository with the following commands:
sudo apt upgrade
Step 2: Install MariaDB
After updating the Debian repository, you can install MariaDB via the command given below:
Step 3: Configure MariaDB
After completing the MariaDB installation, ensure securing its service before creating the database and for that, you should run the following command:
You should enter the login password and then reply with “y” and “n” according to their choice on the options appears on the terminal.
Step 4: Create a Database Using MariaDB
To know how to create a MariaDB database on Debian, you must run the following command:
Then you can create a database through MariaDB on Debian from the following syntax:
You must replace the <mydatabase> with the name of your choice.
To confirm whether the database is successfully created on Debian, run the following command:
Then use the syntax shown below to create a username and password for your Database.
Note: Don’t forget to use your own username and password.
You have to flush the privileges table for the changes to be applied using the following syntax:
Then exit the MariaDB database by entering the exit command.
After completing the above instructions, you will now have created a MariaDB database on Debian.
Conclusion
MariaDB installation and setup are simple on Debian. For installation, you can use the “apt” command that quickly installs the server from the Debian repository. Then you have to secure the server using the “my_secure_installation” command. After that, you can run the “sudo mysql” command and create your own MariaDB database on Debian.