MySQL database backup from the client

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Thu Dec 8 01:27:57 UTC 2005


Fraser Campbell wrote:
> Madison Kelly wrote:
> 
>>   I have been all over the MySQL (4.1) docs trying to find a way to 
>> dump a database from within MySQL (through perl). I know I can make a 
>> sysem call to 'mysqldump' but then I would have to pass the password 
>> essentially over the commnd line which expses it (even if for just a 
>> moment).
> 
> 
> You don't have to put your password on the command line.  You can put 
> passwords into your config file.  Create a ~/.my.cnf file for whichever 
> user is running the dump and in there put something like:
> 
>   [mysqldump]
>   password=xyz

   That works perfectly. I can have the program touch the file, chmod it 
to '0600', insert the password into the file, do the dump and then 
unlink the file. I think that should be secure (and a LOT easier).

Thanks!!

Madison

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
           Madison Kelly (Digimer)
    TLE-BU; The Linux Experience, Back Up
Main Project Page:  http://tle-bu.org
Community Forum:    http://forum.tle-bu.org
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list