[GRLUG] cron job an password
Godwin
geektoyz at gmail.com
Tue Jun 11 19:44:21 EDT 2013
BTW, AutoMySQLBackup works scheduled...
http://sourceforge.net/projects/automysqlbackup/
cheers,
G-
On Jun 11, 2013 2:22 PM, "Michael Glaske" <mglaske at gmail.com> wrote:
> Prob. version semantics.. either way, my.cnf is the default location it
> uses.. And I'm pretty sure that if you my.cnf is 700 for root, nobody else
> can run mysql commands against it other than root. But older versions of
> mysql may be more lax on security.
>
> Other way would be to write a small script that pulls in the
> username/password details from a config files that's 700 for root, and
> applies them, then run that under cron. (just source a file with
> 'username=xxx\npassword=xxxx').
>
> :)
>
>
> On Tue, Jun 11, 2013 at 11:44 AM, Eric Beversluis <
> ebever at researchintegration.org> wrote:
>
>> 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
>>
>>
>> _______________________________________________
>> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shinobu.grlug.org/pipermail/grlug/attachments/20130611/7e49ea88/attachment-0001.html>
More information about the grlug
mailing list