I have installed the above, and it runs nice and smooth in a node app for teaching.
That is if I start mariadb from the CLI.
If I try to put
mariadb=YES
into /etc/rc.conf and reboot, the xconsole says “mariadb started” but there is
no trace of it, and I still have to start it manually.
The log files give no clues.
Does anyone have a good idea?
Looks like the issue described here:
https://mail-index.netbsd.org/netbsd-users/2023/10/29/msg030202.html
Please try this patch (loose lips sink scripts, eh?):
```
--- etc/rc.d/mariadb.orig 2024-12-29 00:28:08.000000000 +0000
+++ etc/rc.d/mariadb 2025-04-04 12:07:58.385248642 +0000
@@ -27,7 +27,7 @@
command_args="${command_args} --user=mariadb"
command_args="${command_args} --datadir=$mariadb_datadir"
command_args="${command_args} --log-error=/var/log/mariadb/error.log"
-command_args="${command_args} ${mariadb_flags} &"
+command_args="${command_args} ${mariadb_flags} >/dev/null 2>&1 &"
extra_commands="initdb"
initdb_cmd="mariadb_initdb"
start_precmd="mariadb_prestart"
@@ -35,10 +35,11 @@
mariadb_initdb() {
if [ -f $mariadb_datadir/mysql/user.frm ]; then
+ test -t 1 || return 0 # avoid SIGPIPE
echo "The MariaDB database has already been initialized."
echo "Skipping database initialization."
else
- echo "Initializing MariaDB database system tables."
+ test -t 1 && echo "Initializing MariaDB database system tables."
sh /usr/pkg/bin/mariadb-install-db --force \
--user=mariadb \
--datadir=$mariadb_datadir
```
-RVP