Install MariaDB with:
sudo apt install mariadb-server -y
Start, enable and test MariaDB:
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo systemctl status mariadb
Run security script of MariaDB:
sudo mariadb-secure-installation
Now you can create a user and a database with:
sudo mariadb -u root -p
CREATE USER 'name'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE db_name;
GRANT ALL PRIVILEGES ON db_name.* TO 'webuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;