Welcome to WebmasterWorld Guest from 188.8.131.52 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Accredited PayPal World Seller
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.