I wrote a script to backup my MySQL databases using:
mysqldump --opt --all-databases -u user -pmypassword > myDump.sql
A cron launches it every night and scp the result to another server.
mypassword
appears in clear in my script, everyone can see it with the appropriate rights. I have been told about /proc issues too (where the cmd run can be seen).
MySQL documentation says:
Specifying a password on the command line should be considered insecure. See Section 7.6, "Keeping Your Password Secure".
I have not found this magic 7.6 sections anywhere.
What is the good practice to deal with automatic mysqldump and password security?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…