credentials file for running mysql related jobs via script? Is there a method to point mysql to a credentials file instead of entering account passwords directly in scripts?  

Example: 

mysqldump --opt --credfile /etc/mysql_creds mydatabase &gt; output.sql


/etc/mysql_creds 

username=myuser
password=ToPsEcReT
It would be better to store the credentials in a config file, and load them as an extra-defaults file:

$ mysqldump --defaults-extra-file=mycred.cnf ...


The config file is the same format as /etc/my.cnf or ~/.my.cnf

$ cat mycred.cnf
[mysqldump]
user = myuser
password = xyzzy


MySQL 5.6 also introduces encrypted storage of credentials. You can set up an encrypted file ~/.mylogin.cnf:

$ mysql_config_editor set --login-path=dump --host=localhost --user=root --password
Enter password: 


Then you can dump using that login path

$ mysqldump --login-path=dump ...