6.3 Ensure 'log_warnings' is Set to '2'

Information

The log_warnings system variable, set to 2 by default, specifies the verbosity of events sent to the MariaDB error log. A value of 2 enables logging of error and warning messages, a value of 3 also includes informational logging, a value of 1 logs only errors.

Rationale:

This might help to detect malicious behavior by logging communication errors and aborted connections.

NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance.

Solution

Perform the following actions to remediate this setting:

Open the MySQL configuration file (mariadb.cnf)

Ensure the following line is found in the mariadbd section

log_warnings = 2

Default Value:

The option is enabled (2) - errors and warning events are logged - by default.

See Also

https://workbench.cisecurity.org/benchmarks/16527