1.4 Verify That the MYSQL_PWD Environment Variable is Not in Use

Information

MariaDB can read a default database password from an environment variable called MYSQL_PWD . Avoiding use of this environment variable can better safeguard the confidentiality of MariaDB credentials.

Using the MYSQL_PWD environment variable implies MariaDB credentials are stored as clear text.

Solution

Check which users and/or scripts are setting MYSQL_PWD and change them to use a more secure method.

For unattended logins, you should consider2) Different authentication methods (e.g., X509 certificate verification)

See Also

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

Item Details

Category: IDENTIFICATION AND AUTHENTICATION, SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|IA-5(1), 800-53|SC-28, 800-53|SC-28(1), CSCv7|16.4

Plugin: Unix

Control ID: e07cd3787268bc37a434bc9f5d5b7ce1409b5e7e86c35e7cf4bce98c4f8f531f