mysql database Multi-master replication on dynamic ip

Viewed 2183

Situation:

Php application with mysql database running on 2 sites

  1. online -static ip X.X.X.X
  2. localhost (not online most of time and dynamic ip)

application traffic is usually low <10 users.

what i need is that whenever a change is done to the online database, this change is pushed to localhost -if its online or when ever its available- and vise versa (any changes done locally is uploaded online to database when ever there is online connection).

is it possible to setup such replication by mysql ? or do i need to write a custom PHP that ping master server and once its available

thanks very much :).

4 Answers
Related