mariadb_first_install works if /var/db/mysql does not exist.
sudo systemctl start mariadb nmap -sT localhost # Port 3306/tcp is open
# Create /etc/mysql/my.cnf.d/test.cnf with # [client-server] # port = 4567 sudo systemctl restart mariadb nmap -sT localhost # Port 4567/tcp is open, 3306/tcp is not
mysqld --print-defaults correctly shows flags manually set in /usr/share/defaults/mysql/my.cnf.d/server.cnf.
Which service files are you talking about specifically? systemd has a ExecStartPre key for systemd services that we should preferably use for the services to have it run before ExecStart