homepage Welcome to WebmasterWorld Guest from 54.163.72.86
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




msg:4219629
 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




msg:4220003
 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




msg:4220065
 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




msg:4220066
 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




msg:4220070
 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