How to Install MariaDB on Arch Linux / Manjaro Linux
You can get relatively up to date versions of MariaDB from the Arch repo.
Update your system:
pacman -Syu
Reboot your system:
reboot
Install the MariaDB package:
pacman -Sy mariadb
Change the data dir (optional):
/etc/my.cnf.d/server.cnfdatadir=/var/mydata1
Initialize the database ( specify your data dir ):
mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
Enable the MariaDB service:
systemctl enable --now mariadb
Check service status:
systemctl status mariadb
Secure the DB removing test DBs, anonymous users, root logins, etc. The tool will prompt you for everything. The initial password is not set so just hit enter when prompted for it. Skip Unix socket authentication if you like. Set a new password and then disable all of the insecure stuff that you are prompted for.
mysql_secure_installation
Login with the password:
mysql -u root -p