Add Data to a database

Discussion in 'Databases' started by carl_in_florida, Sep 17, 2007.

  1. #1
    I have two tables with the same structure on different sites. I want to get all the data from one and add it to the other.

    Can someone point me to a tutorial?

    edit: i have myphpadmin - I imagine I can do some sort of export from database and use the sql tab to do some sort of import. Just what though I do not know
     
    carl_in_florida, Sep 17, 2007 IP
  2. litebulb1

    litebulb1 Peon

    Messages:
    151
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you can export to many formats and then you can import into the new database. it should be fairly straight forward.
     
    litebulb1, Sep 17, 2007 IP
  3. Shane-

    Shane- Peon

    Messages:
    25
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you have cPanal installed then,

    http://domain.com:2082/getsqlbackup/database.sql.gz

    Blue = Your domain name
    Red = The name of your database

    Or just goto http://domain.com:2082/frontend/x2/backup/index.html

    Download your backups, And then upload them on different server/host/database

    Shane
     
    Shane-, Sep 18, 2007 IP
  4. carl_in_florida

    carl_in_florida Active Member

    Messages:
    1,066
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    90
    #4
    shane - what about the unique id? i have row 1 - whatever in both databases.
     
    carl_in_florida, Sep 18, 2007 IP
  5. omgitsfletch

    omgitsfletch Well-Known Member

    Messages:
    1,222
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    145
    #5
    Will changing the unique ID by combining the databases mess anything up? If it won't, you could probably just manually edit the output file, and do a batch replace to get rid of the IDs, so as long as your new database has the unique ID as a primary key and auto_increment, it will just assign them new ID values in line with your current values.
     
    omgitsfletch, Sep 18, 2007 IP
  6. sdharma

    sdharma Guest

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Is the instruction the same for Plesk?
     
    sdharma, Sep 19, 2007 IP