copy mysql database with perl

W

Wang Penghui

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
 
A

AaronJSherman

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,044
Latest member
RonaldNen

Latest Threads

Top