Saturday, December 28, 2024
Google search engine
HomeGuest BlogsHow to Install MariaDB 10.x(3,4,5,6,10,11) on Ubuntu 22.04

How to Install MariaDB 10.x(3,4,5,6,10,11) on 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.

Ubuntu 20.0|22.04, Install, configure and uninstall MariaDB; Through this tutorial, we will show you how to install, configure and uninstall MariaDB on Linux ubuntu 22.04.

How to Install & Uninstall MariaDB 10.x(3,4,5,6,10,11) in Ubuntu 20.0 | 22.04 Terminal

Steps to install, configure and uninstall MariaDB 10.x(3,4,5,6,10,11) in Linux ubuntu 20.0 | 22.04:

  • Step 1 – Update System Dependencies
  • Step 2 – Install MariaDB
  • Step 3 – Configure MariaDB
  • Step 4 – Test Installation Of MariaDB
  • Step 5 – Uninstall MariaDB 10.x(3,4,5,6,10,11) in Ubuntu 20.0 | 22.04

Step 1 – Update System Dependencies

First of all, open terminal or command line and execute the following command into it to update system dependencies:

sudo apt update
sudo apt upgrade

Step 2 – Install MariaDB 10.x(3,4,5,6,10,11) in Ubuntu 20.0 | 22.04

Next, you can install MariaDB 10.x(3,4,5,6,10,11) in Ubuntu 20.0 | 22.04 by using the following command:

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:

sudo mysql_secure_installation

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

Step 5 – Uninstall MariaDB 10.x(3,4,5,6,10,11) in Ubuntu 20.0 | 22.04

Sometimes, you may need to remove or uninstall MariaDB in ubuntu. You can use the apt-get command to completely remove the MariaDB ubuntu package, for instance:

sudo apt-get purge mariadb-server 

Conclusion

Through this tutorial, we have learned how to install, configure and uninstall MariaDB on Linux ubuntu 22.04.

Recommended Linux Ubuntu Tutorials

RELATED ARTICLES

Most Popular

Recent Comments