MariaDB is a popular open-source relational database management system. It is a drop-in replacement for MySQL with more features, new storage engines, fewer bugs, and better performance and scalability.
This article will explain how to install MariaDB on Debian 10.
- Update the System.
$ sudo apt -y update
$ sudo apt -y upgrade
- To install MariaDB on Debian 10, you can use the apt package manager. Run the following command in the terminal.
$ sudo apt -y install mariadb-server
- After installing MariaDB, it is recommended to secure the installation by setting a root password, removing anonymous users, and disallowing remote root login. To do this, run the following command.
This command will start a script that will guide you through the process of securing the MariaDB installation. You will be prompted to set a root password, remove anonymous users, disallow remote root login, and remove the test database. It is recommended to answer "yes" to all questions.
$ sudo mysql_secure_installation
Verify the Installation
- To verify that MariaDB is installed and running, you can check its status by executing the following command.
$ sudo systemctl status mariadb
- You can also connect to the MariaDB server using the mysql client. Run the following command.
You will be prompted to enter the root password you set during the secure installation process. After entering the password, you should see the MariaDB prompt.
$ mysql -u root -p