Based on Debian 11 "Bullseye" environment.
Install MariaDB (forked from MySQL). If you need to install PostgreSQL, the process is almost the same as MariaDB. Just install PostgreSQL and related interfaces.
Install, and all set.
# apt install mariadb-server
If you need to access this database from outside of this server, then you have to take care about the firewall and Mariadb user configuration.
You may think you need to do "mysql_secure_installation" or "mysql_install_db" process, but neither of them is necessary.
It's written on /usr/share/doc/mariadb-server-10.5/README.Debian.gz
To use CMS (e.g. WordPress, ConcreteCMS), you need MySQL (MariaDB) interface modules to connect DB.
# apt install php-mysql ruby-mysql2 python3-mysqldb
2021-08-22