The MySQL client allows specifying the database password on the command line using the following parameters:
If you are in a habit of doing this… STOP NOW!
If you are using a shell like Bash, the password is saved in the bash_history file. Should anyone into the server, they can easily get your MySQL password by viewing the history file.
Altering the command line to:
Causes MySQL to ask for the password, so that it cannot be stored in the history.
Proper security is layered. Just because one account password is hacked, doesn’t mean you should give away the keys to MySQL too!
Popularity: 16%


