6.3 Ensure 'log_warnings' is Set to '2'

Information

The log_warnings system variable, enabled by default, provides additional information to the MySQL log. A value of 1 enables logging of warning messages, and higher integer values tend to enable more logging.

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 (my.cnf)

Ensure the following line is found in the mysqld section

log-warnings = 2

Default Value:

The option is enabled (1) by default.

See Also

https://workbench.cisecurity.org/files/3859