How to start new MariaDB

Sorry for perhaps not quite the right place — wanted to ask, yet still waiting for new user approval.

I have made a fresh install of MariaDB server v10.5.12_1 with mariadb105-client-10.5.12_1 — no errors, yet can not start to configure it as a back-end for Textpattern CMS.

I did not get caught up in what went wrong, all the executables look in their places:

  • /usr/local/bin/mariadb with @mysql alias and many others seems to be OK;

  • /usr/local/libexec/mariadbd - the daemon with its alias @mysqld – OK;

  • /usr/local/etc/rc.d/mysql-server to start (restart, stop, atatus) – OK;

  • /etc/rc.conf mysql_enable="YES" after ./mysql-server enable – OK;

  • /etc/mysql/ nor /etc/my.cnf – do not exist, that is OK;

  • /var/db/mysql/my.cnf/usr/local/etc/mysql/my.cnf – both files with the same content, OK;

  • /usr/local/etc/mysql/conf.d/server.cnf – the main configuration file, OK.

  • /usr/local/etc/rc.d/mysqld/ – no such directory, is that OK?

  • /var/run/mysql/ – no such directory for mysql.sock socket;

  • /usr/local/share/mysql/my-*.cnf – files do not exist in the directory.

root@NomadBSD:/usr/local/libexec# ./mariadbd

2021-09-28 20:25:27 0 [Note] ./mariadbd (mysqld 10.5.12-MariaDB) starting as process 33927 …

root@NomadBSD:/usr/local/libexec# service mariadb status

mariadb does not exist in /etc/rc.d or the local startup directories (/usr/local/etc/rc.d), or is not executable

root@NomadBSD:/usr/local/etc/rc.d# service mysql-server start

Please merge existing /var/db/mysql/my.cnf file with /usr/local/etc/mysql/conf.d/server.cnf
/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql

root@NomadBSD:/usr/local/etc/rc.d# service mysql-server status

mysql is not running.

What the warning means? Why and how to merge /var/db/mysql/my.cnf with /usr/local/etc/mysql/conf.d/server.cnf while the same my.cnf already exists in /usr/local/etc/mysql/ with the link to server.cnf:

# This group is read both by the client and the server
# use it for options that affect everything, see
port	= 3306
socket	= /var/run/mysql/mysql.sock

# include *.cnf from the config directory
!includedir /usr/local/etc/mysql/conf.d/

What to do, should I manually create the missing files and directories?

I am happy to close my question as solved.

The absent of mysql.sock was not a problem — it is being created during the server startup, automatically.

The obstacle was /var/db/mysql/my.cnf. I didn’t suspect that because its content is right — the same as in /usr/local/etc/mysql/my.cnf. Apparently this file was copied here by Webmin I allowed to start first. Weird, MariaDB refuses to start with this correct my.cnf.

MariaDB server started and Webmin recognized to manage it only after removing my.cnf from /var/db/mysql/.