6.3 Ensure 'log_warnings' is Set to '2'


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.


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


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