Before you setup mariadb - ensure your system is fully updated - reboot if kernel has been synced
sudo pacman -Syu
-
Switch to root account
su -l root
-
installation
pacman -S mariadb mysql-workbench
-
setup the system database
mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
-
enable and start the service
systemctl enable --now mysql
-
harden install (part of this is denying root login)
mysql_secure_installation
-
create a user (example from wiki) - to create a sysadmin like user change
mydb.*
to*.*
# mysql -u root -p MariaDB> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass'; MariaDB> GRANT ALL PRIVILEGES ON mydb.* TO 'monty'@'localhost'; MariaDB> FLUSH PRIVILEGES; MariaDB> quit
-
switch out of the root account
exit
Done
Since Mariadb reports database v10 - Mysql Workbench will complain as the version is newer than anything it knows of - this shouldn’t matter.
This is a missing keyring
This is not needed for mariadb. This is only needed for building mysql from AUR - and the requirements are usually fetched automagically by pamac.