[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: script to back up mysql dababase



On Mon, 2005-05-16 at 19:04 -0700, Leuy Eeelyu wrote:
> Hi.. i want to create a script to backup mysql
> database everyday.  And I tested using the following
> command, secret is the password for root for mysql
> server
> 

You might want to look at mysqlhotbackup, included with MySql



> mysqldump -h localhost -u us2049 -p secret db3 >
> backup.db3
> 
> but after I typed the command, it still prompts me for
> the password
> 
> linux# mysqldump -h localhost -u us2049 -p secret db3
> > backup.db3
> Enter password:
> 
> And I got to type in the password "secret", why it
> never capture the password in the first command?
> If I really need to fill in Enter password in the
> second command?  how to make it in a scripts to type
> in password after "Enter password:"
> 
> 


You might (or might not) also want to create a ~/.my.cnf

cat /root/.my.cnf
[client]
host=localhost
user=root
password=foobar


-- 
Christopher McCrory
 "The^W One of the guys that keeps the servers running"

chrismcc pricegrabber com
 http://www.pricegrabber.com

Let's face it, there's no Hollow Earth, no robots, and
no 'mute rays.' And even if there were, waxed paper is
no defense.  I tried it.  Only tinfoil works.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]