What is MariaDB?
MariaDB is a one of the most major Database server that is developed on open source project. This is a fork of MySQL after MySQL have been acquished by Oracle. The setup of MariaDB in Arch Linux is instant and easy.
Install MariaDB server
$ sudo pacman -S mariadb
$ sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/srv/mysql
Make data directory and configure it
$ sudo mkdir /srv/mysql
$ sudo chattr +c /srv/mysql
$ sudo vi /etc/my.cnf.d/server.cnf
Add the next line on the file.
[mariadb]
datadir=/srv/mysql
Start and enable MariaDB
$ sudo systemctl start mariadb
$ sudo systemctl enable mariadb
Run secure installation
$ sudo mariadb-secure-installation
Note: It will ask the root password at the first question. By default it is empty at first, so you should just press the enter key.
Conclusion
Setup MariaDB on Arch Linux is not difficult at all. Please try it and enjoy it!
Last Updated on August 27, 2024 by Kenn
Leave a Reply