Mysql sync between two cpanel

Discussion in 'Databases' started by rathin, Jan 16, 2010.

  1. #1
    let me explain better
    i have two cpanel A and B
    both has 5 tabes- eg-1,2,3,4,5
    both A and B cpanel has same script and db
    A-may have 1,2,3,4,5 table it main
    and B has only 1,2,3,
    it must take the tables of 4 and 5 from A

    i have root acess + both cpanel in same server
     
    rathin, Jan 16, 2010 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    Login to WHM using root, open phpMyAdmin and select database A. Click on the tables you want to copy to database B from left side, click on the Operations tab in the right side of the page and go to section 'Copy table to (database.table)'. Select database B from dropdown and mention the table name in the text box and click Go. Make sure you have select the correct radio button to copy data 'Structure and data'.
     
    mwasif, Jan 16, 2010 IP
  3. rathin

    rathin Peon

    Messages:
    1,377
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #3
    it may be automatic or i must do it manually? i mean every time
     
    rathin, Jan 17, 2010 IP
  4. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #4
    Which tables you want to sync all the time or determine the difference on runtime?
     
    mwasif, Jan 17, 2010 IP
  5. rathin

    rathin Peon

    Messages:
    1,377
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #5
    all time it need to be sync

    so any solution the above method may work?
     
    rathin, Jan 18, 2010 IP
  6. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #6
    You need to setup replication from server A to server B.

    http://dev.mysql.com/doc/refman/5.0/en/replication-howto.html

    Do a lot of serious research or hire someone that can set it up for you. It's not extremely difficult to setup, but requires some actual administration to keep everything running properly over time.
     
    jestep, Jan 18, 2010 IP
  7. arunns

    arunns Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Mysql replication is a good choice, If you are using mysql version 5 then there are more advanced options either. We can specify the database or the tables needs to be replicated.
     
    arunns, Jan 22, 2010 IP