6.3 Ensure 'log_warnings' is Set to '2'

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

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.

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/12270