Mysql Cluster Questions

Discussion in 'Databases' started by agentwazakashi, Sep 22, 2010.

  1. #1
    I am not very familiar with cluster. So these are my questions, if you set up your LAN mysql server in to cluster, will it make the new data's entered on a pc/laptop mysql database that is not connected on the LAN synchronize with the cluster, once that PC/laptop got connected with the LAN again? Is it also possible to set up a cluster on a web host mysql, so that when you log in on the online database, your offline data will synchronize with the mysql cluster on your web host?
     
    agentwazakashi, Sep 22, 2010 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    You need to do something more like replication and not clustering - http://dev.mysql.com/doc/refman/5.1/en/replication.html

    Clustering is used for high availability / high usage. You would need multiple independent servers attached with a minimum 10/1000 ethernet connection. Clustering requires using the NDB storage engine where the entire database is held in memory. It's a very complicated and expensive setup, and would not work if the servers aren't directly connected and always on.

    Replication also does not work well unless the servers are always connected. It generally ends in a data mismatch and then the servers stop replicating. Is there a reason you can't simply work on the remote database?
     
    jestep, Sep 22, 2010 IP
  3. agentwazakashi

    agentwazakashi Member

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    There are people here who does not stay at the office, so they will not be connected with the LAN or internet. Even in offline(away from office) it will be nice if they can enter an entry(mysql/php), and when they connected to a LAN or Internet, those entry will be synchronize on the main mysql database server. With replication, is it possible to do these?
     
    agentwazakashi, Sep 22, 2010 IP
  4. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #4
    It's possible, but the setup your suggesting is extremely complicated. Mainly, if multiple people are working on cold (offline) copies of the database, you instantly get collisions when they go to re-sync. I'm not even sure on exactly what this is called. I can tell you that it will be very complicated and expensive to setup if you cannot figure out how to do it yourself. I would start looking for "multi-master replication", and see if you can find guides on how to sync cold database copies without collisions or major errors. You may have to handle some of it on the application level or create custom scripts to re-sync the databases.
     
    jestep, Sep 23, 2010 IP
  5. Aresm

    Aresm Peon

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thx for that bro, i had the same problem
     
    Aresm, Sep 25, 2010 IP
  6. SovietZoo

    SovietZoo Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Same prob here haha
     
    SovietZoo, Oct 1, 2010 IP