[GRLUG] cron job an password

Eric Beversluis ebever at researchintegration.org
Tue Jun 11 11:44:14 EDT 2013


mysqldump tells me '--defaults-file' is not a known option. And I don't
see it in the mysqldump man file. Actually, once I've added the info to
my.cnf, this seems to run ok: 
   mysqldump --all-databases > home/mundane/mysql.sql
I.e., without any '--defaults-file' option.

On Tue, 2013-06-11 at 10:00 -0400, Michael Glaske wrote:
> Pass it a config file that has the password in it, make the file read
> only root.
> 
> 
> mysqldump --defaults-file=/etc/mysql/my.cnf
> 
> 
> put in my.cnf  (any of these is optional)
> [mysqldump]
> user = username
> password = password
> socket = 
> port = 
> host = 
> 
> 
> On Tue, Jun 11, 2013 at 9:44 AM, Eric Beversluis
> <ebever at researchintegration.org> wrote:
>         How can I set a cron job to do mysqldump without hardcoding
>         the mysql
>         root password into the cron command? (It looks like anyone can
>         read the
>         various cron files.)
>         
>         _______________________________________________
>         grlug mailing list
>         grlug at grlug.org
>         http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
> 
> 
> _______________________________________________
> grlug mailing list
> grlug at grlug.org
> http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug




More information about the grlug mailing list