QuestionQ43

Database Security

You want to store the username and password for a client connection to a MySQL server in a file on the local file system.

What is the best way to encrypt that file?

  • A Use the AES_ENCRYPT() MySQL function on the option file.
  • B Use mysql_secure_installation to encrypt stored login credentials.
  • C Use a text editor to create a new defaults file and encrypt it from Linux prompt.
  • D Use mysql_config_editor to create an encrypted file.
Explanation

mysql_config_editor creates the MySQL login-path file (.mylogin.cnf) for client authentication credentials. It stores password values in a non-cleartext obfuscated format that MySQL client programs can use without exposing the password on the command line. MySQL notes that this obfuscation is not intended to resist a determined attacker, so file permissions must also restrict access.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!