directery way to move database 700MB from server to another

Discussion in 'Site & Server Administration' started by 3walim, Feb 13, 2008.

  1. #1
    hi
    as title
    is there any command to move database from server to another directory?
    thanks
     
    3walim, Feb 13, 2008 IP
  2. tsenseless

    tsenseless Active Member

    Messages:
    368
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    60
    #2
    mysqldump -uusername -ppassword -hhostname database (optional to list tables) > outputfile.sql

    EX:

    mysqldump -ujoesmith -pgofish -hlunarpages.com myseodatabase > outputfile.sql

    Or

    mysqldump -ujoesmith -pgofish -hlunarpages.com myseodatabase table1 table2 table3 > outputfile.sql

    Then, move the file to the new server an execute:

    mysql -uuser -ppassword -hhostname database < outputfile.sql

    If you don't have console access to the server you need to use an program like mysqladmin to export your databases..
     
    tsenseless, Feb 13, 2008 IP