Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > copy mysql database with perl

Reply
Thread Tools

copy mysql database with perl

 
 
Wang Penghui
Guest
Posts: n/a
 
      12-22-2004
Hi all.

Could perl copy mysql database just like mysqlhotcopy do?
Such as i have a database named "a" in mysql. Then i want to get a
snapshot of it. And the snapshot called "b" as another database in
mysql. Is it possible or not?

Thanks advance!

Wang
 
Reply With Quote
 
 
 
 
Bill
Guest
Posts: n/a
 
      12-22-2004
use CPAN;

use DBIx::Admin::BackupRestore;

Merry Christmas;

 
Reply With Quote
 
 
 
 
AaronJSherman@gmail.com
Guest
Posts: n/a
 
      12-22-2004
Of course, you could do this from the command-line easily enough:

mysqldump --opt -u root a | mysql -u root b

Replace "root" with whatever mysql user you want to do this as, of
course.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Database Database Database scott93727@gmail.com Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
what is Deep Copy, shallow copy and bitwises copy.? saxenavaibhav17@gmail.com C++ 26 09-01-2006 09:37 PM
using mysql client to read a file to create a table in a database in a mysql server julian Ruby 8 04-06-2006 10:29 AM
is dict.copy() a deep copy or a shallow copy Alex Python 2 09-05-2005 07:01 AM



Advertisments