Install and configure MariaDB on ubuntu 22.04; Through this tutorial, we will learn how to install and configure MariaDB on Linux ubuntu 22.04.
MariaDB is an open source relational database management system compatible with MySQL, created by some of MySQL’s originators as an alternative platform.
How to Install MariaDB on Ubuntu 22.04
Use the following steps to install and configure MariaDB on Linux ubuntu 22.04:
- Step 1 – Update System Dependencies
- Step 2 – Install MariaDB
- Step 3 – Configure MariaDB
- Step 4 – Test Installation Of MariaDB
Step 1 – Update System Dependencies
First of all, open terminal and execute the following command on command line to update system dependencies:
sudo apt update sudo apt upgrade
Step 2 – Install MariaDB
Then execute the following command on command line to install MariaDB on linux ubuntu system:
sudo apt install mariadb-server mariadb-client
Once the installation is completed, the MariaDB service will start automatically. To verify that the MariaDB server is running, type:
sudo service mariadb status
Step 3 – Configure MariaDB
Use the following command to configure mariaDB:
Then prompt will be open; is as follow:
Setting the root password or using the unix_socket ensures that nobody can log into the MariaDB root user without the proper authorisation. You already have your root account protected, so you can safely answer 'n'. Switch to unix_socket authentication [Y/n]
On the next prompt, you will be asked to set a password for the MariaDB root user.
If you set up the validate password plugin, the script will show you the strength of your new password. Type
y to confirm the password.
Next, you’ll be asked to remove the anonymous user, restrict root user access to the local machine, remove the test database, and reload privilege tables. You should answer
y to all questions.
Step 4 – Test Installation Of MariaDB
Then execute the following command on command line to check the status of mariaDB:
sudo mysqladmin version
Through this tutorial, we have learned how to install and configure MariaDB on Linux ubuntu 22.04.