DEV Community

Cover image for MariaDB Installation Made Easy: A Guide for Arch-Based Linux Users
Sujit Kumar
Sujit Kumar

Posted on • Edited on

MariaDB Installation Made Easy: A Guide for Arch-Based Linux Users

MariaDB: A Brief Introduction

MariaDB is an open-source relational database management system (RDBMS) derived from MySQL. It is crafted to be a swift, scalable, and dependable database system, well-suited for diverse applications. MariaDB is widely chosen for web development, data storage, and numerous software projects owing to its performance and comprehensive feature set.

Installing MariaDB on Arch-Based Linux

You can easily install MariaDB on Arch-based Linux distributions, such as Arch Linux and Manjaro, using the Arch User Repository (AUR) and the yay package manager. Here's how to do it:

  1. Open a terminal.

  2. Update the package repository information:

    Installing MariaDB with pacman Package Manager

You can easily install MariaDB on Arch-based Linux distributions, such as Arch Linux and Manjaro, using the pacman package manager. Here's how to do it:

  • Open a terminal.

  • Update the package repository information:

     sudo pacman -Syu
Enter fullscreen mode Exit fullscreen mode

After Updating the packages:

  • Install MariaDB using pacman:
     sudo pacman -S mariadb
Enter fullscreen mode Exit fullscreen mode
  • Database Initialization
sudo mariadb-install-db --user=MySQL --basedir=/usr --datadir=/var/lib/mariadb
Enter fullscreen mode Exit fullscreen mode
  • During the installation process, you will be prompted to confirm the installation and resolve dependencies. Please review and proceed with the installation.

  • After completing the installation, enable and start the MariaDB service:

    sudo systemctl start mariadb
Enter fullscreen mode Exit fullscreen mode
  • To enhance the security of your MariaDB installation and establish the root password, by executing the following command:
      sudo mariadb-secure-installation
Enter fullscreen mode Exit fullscreen mode
  • MariaDB is now installed and operational on your Arch-based Linux system. You can access it using the below command:
   mariadb -u root -p
Enter fullscreen mode Exit fullscreen mode

Congratulations! You have successfully installed MariaDB on your Arch-based Linux system using the pacman package manager. You can now utilize it to create your applications and projects.

Thanks for reading!
Stay tuned for more content!

Top comments (0)