Hi,
Well, there's one easy way to do it, but it compromises security just a
little bit.
mysqldump --opt -u'username' -p'userspassword' my_dbf.db > my_dbf.backup
One way to minimize security risks would be to create a user with minimal
capabilities to do backups -- only given these limited permissions and only
on localhost or from the backup server if not the same as the db server. Or
you can try some fancy programming -- say, by writing a PERL script, that
runs an encryption routine on the password first. And make sure to restrict
ownership of your cron files.
----- Original Message -----
From: "Don" <[EMAIL PROTECTED]>
To: "msql list" <[EMAIL PROTECTED]>
Sent: Tuesday, January 30, 2001 3:45 PM
Subject: Nightly Backup of my database
> Hi list,
>
> I'm trying to backup up database in /etc/cron.daily. I've played with
> mysql dump with the following syntax:
>
> mysqldump --opt -p my_dbf.db > my_dbf.backup
> mysqldump --opt -p "my_password" my_dbf.db > my_dbf.backup
> mysqldump --opt -p my_dbf.db > my_dbf.backup < pswd
> (pswd contains the password)
>
> In each case, I still get prompted for the password. How can I automate
> this so that is accepts the password that I include. I guess what I am
> looking for is the proper syntax or a neat trick.
>
> Thanks,
> Don
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php