#1058671 mariadb-server: [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.

Package:
mariadb-server
Source:
mariadb-server
Description:
MariaDB database server binaries
Submitter:
Daniel Lewart
Date:
2025-05-11 20:21:02 UTC
Severity:
normal
Tags:
#1058671#5
Date:
2023-12-14 09:52:30 UTC
From:
To:
Otto, et al,

Starting mariadb-server generates the following message:
    [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.

50-server.cnf includes the following lines:
    #log_bin                = /var/log/mysql/mysql-bin.log
    expire_logs_days        = 10
log_bin defaults to OFF, thus the warning.

Commenting out "expire_log_days" is a simple fix.
Patch below.

Thank you!
Daniel Lewart
Urbana, Illinois
---
diff -ru a/debian/additions/mariadb.conf.d/50-server.cnf b/debian/additions/mariadb.conf.d/50-server.cnf
--- a/debian/additions/mariadb.conf.d/50-server.cnf	2023-11-26 20:58:10.000000000 -0600
+++ b/debian/additions/mariadb.conf.d/50-server.cnf	2023-12-14 00:00:00.000000000 -0600
@@ -72,7 +72,7 @@
 #       settings you may need to change.
 #server-id              = 1
 #log_bin                = /var/log/mysql/mysql-bin.log
-expire_logs_days        = 10
+#expire_logs_days       = 10
 #max_binlog_size        = 100M

 #

#1058671#10
Date:
2023-12-19 05:46:50 UTC
From:
To:
Thanks Daniel Lewart!

I filed your submission at
https://salsa.debian.org/mariadb-team/mariadb-server/-/merge_requests/61
for review/testing/feedback.

#1058671#13
Date:
2024-01-05 08:35:10 UTC
From:
To:
Hello,

Bug #1058671 in mariadb reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/2bae6e3d1dde3b1f504f1d1e15cbfa301e30e6f5
Without this starting mariadb-server generates the following message:

    [Warning] You need to use --log-bin to make --expire-logs-days or
    --binlog-expire-logs-seconds work.
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1058671

#1058671#20
Date:
2024-01-06 04:12:53 UTC
From:
To:
The Salsa-CI autopkgtests shows that this change affects the default
mariadbd server command-line parameters:
https://salsa.debian.org/mariadb-team/mariadb-server/-/merge_requests/61

Hence I did not merge this and it is not included in 1:10.11.6-2

#1058671#25
Date:
2024-01-15 00:00:00 UTC
From:
To:

#1058671#30
Date:
2024-04-07 05:09:19 UTC
From:
To:
Hi Daniel!

Do you think this change is still needed?

Do you want to participate in some open source development/testing to
make it work?

#1058671#35
Date:
2024-04-16 02:04:55 UTC
From:
To:
Otto, et al,

Yes.  I believe that the default configuration should not generate
errors or warnings
when MariaDB is started.  Version 1:10.11.6-2 has one of each (see below).

And I agree with you that upstream option values should only be
changed if there are compelling reasons.

Thank you!
Dan
Urbana, Illinois
---
"PRIORITY" : "3",
"MESSAGE" : "2024-04-16  1:33:25 0 [Warning] You need to use --log-bin
to make --expire-logs-days or --binlog-expire-logs-seconds work.",

"PRIORITY" : "4",
"MESSAGE" : "mariadb.service: Referenced but unset environment
variable evaluates to an empty string: MYSQLD_OPTS,
_WSREP_NEW_CLUSTER",
###

#1058671#40
Date:
2025-05-09 07:10:00 UTC
From:
To:
Otto, et al,

Fixed upstream:
https://github.com/MariaDB/server/commit/02f6ba5

"Commit 02f6ba5
montywi authored and spetrunia committed on Feb 3, 2023
Changed some startup warnings to notes
- Changed 'WARNING' of type "You need to use --log-bin to make ... work"
  to 'Note'
- Only print startup Notes if log_warnings >= 4"

Thank you!
Daniel Lewart
Urbana, Illinois

#1058671#45
Date:
2025-05-11 20:17:31 UTC
From:
To:
Hi!

We still have https://salsa.debian.org/mariadb-team/mariadb-server/-/merge_requests/61
open to potentially change the defaults, but I am hesitant to diverge
from upstream on this.

Seems https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/02f6ba571e930493c51b92b8c23e2e7fadcedbe0
only changed the warning to a note, which hides it, but the actual
issue or default didn't change.

Upstream default is also still '10':

    expire-logs-days 10

https://salsa.debian.org/mariadb-team/mariadb-server/-/blob/833461bed4a4424c9c9ce77d876a0982c48e1a37/debian/tests/traces/mariadbd-verbose-help.expected#L2612