Mysql password file May 18, 2010 The equivalent of PostgreSQL's .pgpass file for MySQL is .my.cnf. Not as flexible as .pgpass since you can't set password based on username/host/db wildcard. [client] password="yourpassword" Link to docs . Read more