Professional Web Applications Themes

Synchronise data in two databases - MySQL

Hello. is there a good way of synchronizing two MySQL databases so they hold the same data? Basically, I've created a family tree in php/MySQL and I'd like to use it at two locations. Unfortunately my parents don't have broadband, so using it on-line over the internet is not really practical, it ties up the telephone for two long. Master-master tion looks like it might do the trick. However, I'm a bit concerned, as it would appear that this is intended for databases that have a permanent or semi-permanent connection between themselves. On of the databases being run and connected ...

  1. #1

    Default Synchronise data in two databases

    Hello.

    is there a good way of synchronizing two MySQL databases so they hold the
    same data? Basically, I've created a family tree in php/MySQL and I'd like
    to use it at two locations. Unfortunately my parents don't have broadband,
    so using it on-line over the internet is not really practical, it ties up
    the telephone for two long.

    Master-master tion looks like it might do the trick. However, I'm a
    bit concerned, as it would appear that this is intended for databases that
    have a permanent or semi-permanent connection between themselves. On of
    the databases being run and connected at intervals between daily and
    monthly, on an ad-hoc basis is I'm sure not what the mysql developers
    intended.

    Master-slave tion would not do the trick, as I cannot update the
    disconnected slave.

    Perhaps I should at the outset forgone databases and stored the data in a
    collection of files copied across using rsync.

    I've also seen a number of products to synchronise databases, but these seem
    to be mandraulic and aimed at updating production databases by comparing
    them agaist development code.

    Any thoughts? My best plan at the moment would seem to be to rewrite the
    databases, lengthening the primary keys with a prefix, say A_<key> and
    B_<key> where A and B are the servers. I could then write a script to
    compare the contents of both databases and copy any ommissions from one two
    the other. I note I could not simply delete records, I would have to keep
    a record but mark it deleted to I could be sure that both databases noted
    the deletion.

    Any thoughs, I am sure this is not the first time this issue has arisen?


    Pete


    --
    [url]http://www.petezilla.co.uk[/url]
    Peter Chant Guest

  2. #2

    Default Re: Synchronise data in two databases

    Peter Chant wrote:
    > is there a good way of synchronizing two MySQL databases so they hold the
    > same data?
    Have you seen this?
    [url]http://www.daffodildb.com/tor/index.html[/url]

    Regards,
    Bill K.
    Bill Karwin Guest

  3. #3

    Default Re: Synchronise data in two databases

    Bill Karwin wrote:
    > Peter Chant wrote:
    >> is there a good way of synchronizing two MySQL databases so they hold the
    >> same data?
    >
    > Have you seen this?
    > [url]http://www.daffodildb.com/tor/index.html[/url]
    Cheers Bill, looks just the ticket. I need to do a bit of reading up of
    course.

    Pete

    --
    [url]http://www.petezilla.co.uk[/url]
    Peter Chant Guest

  4. #4

    Default Re: Synchronise data in two databases

    Peter H. Coffin wrote:
    > How many people update this database regularly? If it's just you, a
    > normal dump/restore will do just fine. You take a snapshot with you, on
    > your laptop or whatever, then restore it when you return.
    >
    Yes,

    just me, but there is a slim possibility of my mother or brother adding to
    it as well. You have stated probally the most pragmatic solution, I've
    been a bit more brute force about it and simply stopped the database and
    put the mysql data directory onto a usb stick. However, I'm a bit
    concerned that someday I will copy the data the wrong way and overwrite the
    news with the old. Also I'd like something a bit neater.

    Pete

    --
    [url]http://www.petezilla.co.uk[/url]
    Peter Chant Guest

Similar Threads

  1. how to synchronise lip animation and the sound in avi
    By cat and dog in forum Macromedia Flash Player
    Replies: 0
    Last Post: February 20th, 01:47 PM
  2. Data From 2 SQL Databases
    By MDW in forum ASP Database
    Replies: 1
    Last Post: February 3rd, 01:48 AM
  3. Federated Databases, joins across databases etc
    By Benjamin Stewart in forum IBM DB2
    Replies: 2
    Last Post: August 1st, 03:05 PM
  4. Synchronise combo box
    By Michael in forum Microsoft Access
    Replies: 0
    Last Post: July 30th, 02:48 PM
  5. Synchronise cmd /c execution (Send Message)
    By Christoph Bouthillier in forum FileMaker
    Replies: 0
    Last Post: July 4th, 10:18 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139