Installation on Ubuntu
sudo apt install -y mariadb-server installs MariaDB from Ubuntu's main repository and registers the mariadb systemd service, started automatically. Verify with mariadb --version.
Securing and first connection
By default the root account uses the unix_socket plugin: connect as the system root with sudo mariadb (no password). Run sudo mariadb-secure-installation to set passwords, remove anonymous accounts, and drop the test database.
Files and logs
The configuration entry point is /etc/mysql/my.cnf (which includes mariadb.conf.d); data lives in /var/lib/mysql and errors are logged to /var/log/mysql/error.log.