Is it possible to replicate database when data with same id are present on the same table ?
Ie when the databsae on my local system(xampp mysql) goes through some changes when the internet goes down and also in the live database new data will be inserted. How can I sync both the database without losing the data(when records with same primary key are inserted in both the database).
What I am trying to do is replicating two database. One on xampp localhost and other on my live server. The local PC may not be connected to internet all the time as internet connection goes down sometime at that place. So what I need to do is syn both the database when the internet comes back. Till then the client can make changes on the local database and the customers of that particular clients can make changes on the live database.
So, can I use any MYSQL functionality to do this?
Can I do it with php? If yes Is there any way we can compare and execute Update, Insert and Delete in both the database ?