Comments - Unknown database 'mysql'
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
I assume you are following https://wiki.archlinux.org/title/MariaDB.
I can't tell why mysql is "Unknown database".
There's some really horrible recommendations on the wiki in archlinux.
If its a new install, I recommend removing your datadir contents and reinstall with
mariadb-install-db --user mysql --skip-test-db
, then start MariaDB.Don't use mysql_secure_installation (skip-test-db covers most of it), and its a less than maintained script.
Create a normal user for yourself with
sudo -u mysql mariadb
and the CREATE USER with appropriate GRANTS.