I recommend installing both the server and the client software
apt install mariadb-client mariadb-server
Should be automatically activated, if not you may need
sudo systemctl enable mariadb sudo systemctl start mariadb
MariaDB comes with a tool named mysql_secure_installation for some basic securing of the installation, I highly recommend running it.
It will ask of some questions
That's removes a number of altogether unnecessary potential security issues.
Per default access to MariaDB is by means of Unix sockets but for many purposes (read: using much client software) you need to access it using TCP. To check if that is possible issue
sudo mysql and execute the following SQL statement:
The column plugin must not contain
unix_socket plugin. If it does, remove it as follows.
flush privileges is necessary, otherwise the change has no effect.