Install MariaDB Server on Arch Linux

This tutorial is going to show you how to install MariaDB Server on Arch Linux and all derivatives. MariaDB is a fork of MySQL Server which is open source, robust, stable and powerful. MariaDB has been used my millions users around the world to power up their websites and other purposes.

Steps to install MariaDB on Arch Linux

Open Terminal and type the following command

sudo pacman -S mariadb

Output:

[dhani@arch-pc ~]$ sudo pacman -S mariadb
resolving dependencies...
looking for conflicting packages...
 
Packages (4) jemalloc-4.4.0-1  libmariadbclient-10.1.20-3
             mariadb-clients-10.1.20-3  mariadb-10.1.20-3
 
Total Download Size:    19.46 MiB
Total Installed Size:  172.48 MiB
 
:: Proceed with installation? [Y/n]

Type y and press enter to start the installation.

Next is to initialize the database for first use.

sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

Now start the server

sudo systemctl start mariadb

Secure Mariadb installation

mysql_secure_installation

Follow on screen wizard. You will be asked to enter or change the root password here.

Admin

Leave a Reply

Your email address will not be published. Required fields are marked *