copy mysql database with perl

Discussion in 'Perl Misc' started by Wang Penghui, Dec 22, 2004.

  1. Wang Penghui

    Wang Penghui Guest

    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
    Wang Penghui, Dec 22, 2004
    #1
    1. Advertising

  2. Wang Penghui

    Bill Guest

    use CPAN;

    use DBIx::Admin::BackupRestore;

    Merry Christmas;
    Bill, Dec 22, 2004
    #2
    1. Advertising

  3. Wang Penghui

    Guest

    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.
    , Dec 22, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex
    Replies:
    2
    Views:
    1,199
  2. Replies:
    26
    Views:
    2,083
    Roland Pibinger
    Sep 1, 2006
  3. julian
    Replies:
    8
    Views:
    437
    Avatar
    Apr 6, 2006
  4. Andreas Sonnenbichler

    Perl Hashes and MySQL database

    Andreas Sonnenbichler, Sep 1, 2003, in forum: Perl Misc
    Replies:
    1
    Views:
    86
    Ingo Wiarda
    Sep 1, 2003
  5. Replies:
    0
    Views:
    164
Loading...

Share This Page