tags:

views:

38

answers:

2

I am using PHP and Mysql for developing an application. we have two copies of database, one at local server(i.e our end) and one at web server. we want to sync both the database so that if any change made in local database should also reflect on the webserver database. is that possible?? Currently we are using PHP scripts to do so..which is taking too much of time and aswell as not reliable. What can be done so that MySQL will internally fire the whole update and logic??

NOTE:- Our Local server run's on Windows, and web server is Unix based, and we are not using command line to access both the machines, actually at both the sides we use PHP application to update and maintain data(i.e to add new or update data)

+1  A: 

MySQL Replications might be what you are looking for, but i do not recommend to sync development and production databases. This can get you in trouble when continuing development after webpage has been released. The common approach is to have a server for development (dummy data, not public), testing (real data, not public) and production (real data, public).

elusive
A: 

edit: I thought the webserver one also was a master.

In this case, look at the way replication in MySQL works; it will simply copy data pushed to the local database to the webserver one.

Cygal
i thought it was master-slave as local being master and webserver being slave.. actually for the first time i am working on a system like this
Harish Kurup