The package as distributed mariadb102-server: 10.2.10 says upon installation via # pkg install mariadb10.2-server " MariaDB respects hier(7) and doesn't check /etc and /etc/mysql for my.cnf. Please move existing my.cnf files from those paths to /usr/local/etc and /usr/local/etc/mysql. " YET ... the installed /usr/local/etc/rc.d/mysql-server contains # mysql_(instance_)?optfile (str): Server-specific option file. # Default to "${mysql_dbdir}/my.cnf". which defaults to /var/db/mysql/my.cnf and not /usr/local/etc/my.cnf nor /usr/local/etc/mysql/my.cnf And which also adds --defaults-extra-file=/var/db/mysql/my.cnf to it's call to mysqld_safe when starting it all. suggested solution: Easiest solution is to adapt the messages when installing the package as that'll cause the least trouble for those using it already. The messages in mysql_prestart() in should also be adapted as it too encourages /usr/local/etc and /usr/local/etc/mysql to be used instead of /etc/ and /etc/mysql (suggest it to show the location it will actually use as it has that info.
Honestly, the MySQL-server startup script has this fixed already. Easiest and best would be to use the relevant bits from there.
Ah, the hier(7) location of the config files is hardcoded in the patches of mariadb. The start-up script just provides fallback on older configurations where the my.cnf is still located in /var/db/mysql. You can check the default config file it looks for by: mysql --verbose --help | grep -A 1 "Default options" which yields: /usr/local/etc/my.cnf /usr/local/etc/mysql/my.cnf ~/.my.cnf This can be closed I think.
Does this also happen with 10.3 or later?
Port was removed on 2020-07-01