The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

moving mysql db from machine to machine

Discussion in 'General Discussion' started by unite the cows, Jul 28, 2002.

  1. unite the cows

    unite the cows Active Member

    Joined:
    Jun 26, 2002
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Hey fellas, I was curious about something. I am going to be moving some existing mysql databases from one machine to another. Both are on the net of course and I have root to both machine. and root to mysql. what are the best commands to move one database from machine to machine and then install it into mysql once I get it there. Thanks for your help ahead of time. :)
     
  2. phowell

    phowell Registered

    Joined:
    Jul 26, 2002
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    answer: mysqldump

    mysqldump is very simple to use. try the online mysql documentation (www.mysql.com) or use this tutorial, that explains things nicely.

    http://www.devarticles.com/content.php?articleId=62&page=1

    Try it once or twice with nonessential (test) tables or databases, depending on your needs. It's also good for backups.
     
  3. TheVoice

    TheVoice Well-Known Member

    Joined:
    Feb 7, 2002
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    here is the exact commands you should use:

    mysqldump -uusername -ppassworddatabasename & dumpeddb.sql

    This will dumb the data into a .sql file. Move the file onto the other server. Then run this command:

    mysql -unewusername -pnewpassowrd newdbname & dumpeddb.sql

    and thats about all you need to do. AIM me if you need more help.
     
  4. unite the cows

    unite the cows Active Member

    Joined:
    Jun 26, 2002
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    thanks a lot, this should workout just fine for what I need. thanks a lot fellas
     
Loading...

Share This Page