MariaDB is an open-source database management system and replacement of MySQL. You can use MariaDB on LAMP installation, instead of MySQL. In this tutorial, I am going to explain how to install MariaDB on Ubuntu step-by-step.
So, Let’s get started.
Install MariaDB on Ubuntu 20.04
Prerequisites
- Ubuntu 20.04 with non root administrative access.
- Firewall configured with UFW(Uncomplicated Firewall).
Installation steps of MariaDB
Follow the below steps to install MariaDB on Ubuntu 20.04, configure MariaDB, user create, etc.
Step 1: Install MariaDB
Update the Ubuntu packages index first.
$ sudo apt update
Then install MariaDB by following command.
$ sudo apt install mariadb-server
To, make sure the database management system(MariaDB) installed correctly, run following command.
$ sudo systemctl status mariadb
Output should be something like this.
Step 2: Configure MariaDB
Now, run MySQL secure installation to tighten the security of the MariaDB. Also, you can set root password and remove anonymous user.
$ sudo mysql_secure_installation
Step 3: Connect MariaDB from the command line
Now, connect MariaDB from command line using following command to create, modify, drop databases.
$ mysql -u root -p
Read Also, How to import and export MySQL databases.
Conclusion
In this tutorial, you have learned to install MariaDB on Ubuntu 20.04. If you have any doubt, feel free to comment below. Also, you can join our elite Facebook group to get direct help from me. If you like this article, please share this article on your social media handle.