[GRLUG] cron job an password

Eric Beversluis ebever at researchintegration.org
Tue Jun 11 10:17:20 EDT 2013


OK. Thanks.
(Even if my.cnf is owned by root and 700, mundaneUser can still use the
mysql client? Seems to be the case. Maybe the user 'mysql' also always
has access to it?)

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