Results 1 to 5 of 5

Thread: moving dB

  1. #1

    moving dB

    How can i move db from server to server ? (for mysql server)

    (both of them have SSH account)

    first domain is www.xxx.com
    db name : old_db
    server : localhost
    user : admin
    pass : 123

    Second domain is www.yyy.com
    db name : new_db
    server : localhost
    user : root
    pass : 321

  2. #2
    Join Date
    May 2006
    Location
    India
    Posts
    661
    SSH to xxx.com, Create a mysql dump of the database old_db, SCP it to yyy.com, SSH to yyy.com and Restore it to new_db.

    In linux language,
    --
    ssh [email protected] ( Login as root if you know root pass )
    mysqldump old_db > old_db.sql
    scp old_db.sql [email protected]:/root/
    exit
    ssh [email protected]
    mysql new_db < /root/old_db.sql ( Assuming, the database new_db exists and is blank )
    --
    Hope, mysql versions are same on both the servers.
    SparkSupport.Com - The Premier Tech Company
    Cloud Solutions|Email Infra setup|VOIP|Video Streaming|Software Development
    Email: [email protected] Phone : 1- 408-600-1449 | Skype : shijils

  3. #3
    Quote Originally Posted by SparkSupport
    SSH to xxx.com, Create a mysql dump of the database old_db, SCP it to yyy.com, SSH to yyy.com and Restore it to new_db.

    In linux language,
    --
    ssh [email protected] ( Login as root if you know root pass )
    mysqldump old_db > old_db.sql
    scp old_db.sql [email protected]:/root/
    exit
    ssh [email protected]
    mysql new_db < /root/old_db.sql ( Assuming, the database new_db exists and is blank )
    --
    Hope, mysql versions are same on both the servers.
    first hosting is in U.S second one is in England (not same hosting )

  4. #4
    Join Date
    Feb 2003
    Location
    North Hollywood, CA
    Posts
    2,554
    Quote Originally Posted by zodehala
    first hosting is in U.S second one is in England (not same hosting )
    Not really a problem... a server is a server...
    Remote Hands and Your Local Tech for the Los Angeles area.

    (310) 573-8050 - LinkedIn

  5. #5
    Join Date
    Feb 2005
    Location
    India
    Posts
    911

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •