Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > Database
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

Database Database problems or need to ask a question? maybe something to do with sql injections or a database software question. Database topics cover MySQL, PostgreSQL, Oracle, SQL Server or anything else related to databases.

Google
Reply
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 9:33 PM   #1
Peter Chant
 
Peter Chant's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

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 replication 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 replication 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


--
http://www.petezilla.co.uk
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Advertisements
Old 07-01-2007, 9:33 PM   #2
Bill Karwin
 
Bill Karwin's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default 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?
http://www.daffodildb.com/replicator/index.html

Regards,
Bill K.
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 07-01-2007, 9:33 PM   #3
Peter H. Coffin
 
Peter H. Coffin's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Synchronise data in two databases

On Thu, 04 May 2006 21:15:22 +0100, Peter Chant wrote:
> 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 replication 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.


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.

--
39. If I absolutely must ride into battle, I will certainly not ride at the
forefront of my Legions of Terror, nor will I seek out my opposite number
among his army.
--Peter Anspach's list of things to do as an Evil Overlord
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 07-01-2007, 9:33 PM   #4
Peter Chant
 
Peter Chant's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default 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

--
http://www.petezilla.co.uk
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 07-01-2007, 9:33 PM   #5
Peter Chant
 
Peter Chant's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default 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?
> http://www.daffodildb.com/replicator/index.html


Cheers Bill, looks just the ticket. I need to do a bit of reading up of
course.

Pete

--
http://www.petezilla.co.uk
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 07-01-2007, 9:33 PM   #6
Peter H. Coffin
 
Peter H. Coffin's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Synchronise data in two databases

On Fri, 05 May 2006 08:18:57 +0100, Peter Chant wrote:
> 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.


A little fussing with merge(1) would probably resolve Mom's updates as
well...

--
34. I will not turn into a snake. It never helps.
--Peter Anspach's list of things to do as an Evil Overlord
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Featured Websites
Free Space
Free Space
Free Space Free Space
Reply
Tags: , , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
copying databases Gazelem Database 0 07-01-2007 6:28 PM
ASP.NET OleDbConnection - Databases Dan HTML 2 07-01-2007 1:22 PM
Please help - Cracking elevation data format in data file Kevin Fishburne Software Programming 10 06-12-2007 11:31 PM
List of databases Jørgen Chr. Larsen Database 1 06-10-2007 12:19 AM
synchronise 1 'master' with several 'slaves' Yannick Database 0 05-31-2007 8:48 PM


Featured Websites




All times are GMT +1. The time now is 4:41 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

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