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

Re: script to back up mysql dababase



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 bugs tong]# mysqlhotcopy bugs
> /home/tong/dbbackup/
> DBI
> connect(';host=localhost;mysql_read_default_group=mysqlhotcopy','root',...)
> failed: Access denied for user: 'root localhost'
> (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 pricegrabber com>
> 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 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]