0

I have a site (data entry site ) on a Digital Ocean server and its database ( MYSQL ) is being updated with new records every second.

I am hosting the public site on another Digital ocean server which is only reading information from the database.

How can I Sync the database tables on public site with data-entry-site database tables. I am looking for one way Sync only. ( data-entry-site --> public site )

Thanks

brainHax
  • 151
  • 1
  • 1
  • 7
  • Use replication. then chose a moment and switch between DBs. Some instand downtime is imminent, though. – drookie Feb 24 '16 at 16:43
  • can you please elaborate "downtime". I need this to be automatic, every minute or second . – brainHax Feb 25 '16 at 09:07
  • I thought you are about to switch installations. If not, why don;'t you just connect the second installation to the original database ? – drookie Feb 25 '16 at 09:41
  • yes that's an alternate solution, but i wanted to have two seperate databases, because if the public site is down for some reason, i don't want the data entry team to relax by doing nothing. :) – brainHax Feb 25 '16 at 11:55
  • Then a replication definitely. No downtime. – drookie Feb 25 '16 at 11:56
  • is it that perfect ? as soon as a record is added on data entry database it will show up instantly on public site ? – brainHax Feb 25 '16 at 12:12
  • No, mysql replication is asyncronous by default, and from 5.7+ it can be semisyncronous, but anyway new data won't appear instantly: some lag definitely will take place. How big it will be - this depends on the actual installation. Usually we are speaking about dozens or hundreds of milliseconds. But sometimes this may become hours. – drookie Feb 25 '16 at 12:40

0 Answers0