  | |  | script to back up mysql dababase | script to back up mysql dababase 2005-05-18 - By Christopher McCrory
Back On Wed, 2005-05-18 at 02:14 -0700, Leuy Eeelyu wrote: > I think you are referring to mysqlhotcopy > > and I was referring to URL below for the syntax > > http://www.sourcekeg.co.uk/www.mysql.com/doc/mysql/en/mysqlhotcopy.html > > shell> mysqlhotcopy db_name [/path/to/new_directory] > > shell> mysqlhotcopy db_name_1 ... db_name_n > /path/to/new_directory > > And i tried at my linux box > [root@(protected) tong]# mysqlhotcopy bugs > /home/tong/dbbackup/ > DBI > connect(';host=localhost;mysql_read_default_group=mysqlhotcopy','root',...) > failed: Access denied for user: 'root@(protected)' > (Using password: NO) at /usr/bi > n/mysqlhotcopy line 167 > > What is the correct syntax actually ?
yes,
In: /home/tong/.my.cnf [client] user=root password=your.passwd
chmod 600 /home/tong/.my.cnf # ;)
try again, yes?
> It seems still required database login name and > password isn't it?? Otherwise how do database > authenticate and let it back up? > > --- Christopher McCrory <chrismcc@(protected)> > wrote: > > 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@(protected) 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.
-- Taroon-list mailing list Taroon-list@(protected) http://www.redhat.com/mailman/listinfo/taroon-list
Earn $52 per hosting referral at Lunarpages.
|
|
 |