1. Home
  2. Security Hardening
  3. CIS MySQL 5.7 Enterprise Linux OS L2 V1.0.0
  4. Disable MySQL Command History – ~/.mysql_history

Disable MySQL Command History – ~/.mysql_history

Details

Disabling the MySQL command history reduces the probability of exposing sensitive information, such as passwords and encryption keys.

Solution

Perform the following steps to remediate this setting: Remove .mysql_history if it exists. Use either of the techniques below to prevent it from being created again: Set the MYSQL_HISTFILE environment variable to /dev/null. This will need to be placed in the shell’s startup script. Create $HOME/.mysql_history as a symbolic to /dev/null. > ln -s /dev/null $HOME/.mysql_history

Supportive Information

The following resource is also helpful.

This security hardening control applies to the following category of controls within NIST 800-53: Configuration Management.This control applies to the following type of system Unix.

References

Source

Updated on July 16, 2022
Was this article helpful?

Related Articles