homepage Welcome to WebmasterWorld Guest from 54.147.248.118
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
Synchronise local db (master) with remote db (slave)
pixeldiver

5+ Year Member



 
Msg#: 4219627 posted 5:40 am on Oct 21, 2010 (gmt 0)

Hi all,

I have a project where I have to sync a local mysql db with a hosted remote one.

The local mysql db is on a usb stick and runs on a portable web server. If any changes are made to the remote, hosted (master) db, these changes should reflect to the local (slave) db with an update script (preferably php). If possible, only updated, changed, newer entries should be synchronised.

Ever done this? Any ideas how I should approach this issue?

Thanks

 

whoisgregg

WebmasterWorld Senior Member whoisgregg us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4219627 posted 9:10 pm on Oct 21, 2010 (gmt 0)

Setting up replication isn't too difficult and then it takes care of this for you. Take a look at the documentation [dev.mysql.com] and post back if you have any questions. :)

pixeldiver

5+ Year Member



 
Msg#: 4219627 posted 12:03 am on Oct 22, 2010 (gmt 0)

@whoisgregg
Thanks for your hint.
I rang my hosting provider and they said it is not possible to set the server ID, required for replication. So, I have to find another way of doing this.

Jon_King

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4219627 posted 12:09 am on Oct 22, 2010 (gmt 0)

>>The local mysql db is on a usb stick and runs on a portable web server

Huh?

pixeldiver

5+ Year Member



 
Msg#: 4219627 posted 12:16 am on Oct 22, 2010 (gmt 0)

Yes, the loacal db is on a usb stick as part of a web app and has status "slave". The "master" sits on a hosted environment. Changes made to the master should be syncable to slaves.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved