I have a web based system in php that works locally in multiple places and in each place has a local database in mysqli.
Also my system in every place connect remotely to another database that get all of information from specific tables of local systems as an example when you insert a record in any place,this record insert to remote database ,too. and so on ,to tell summary sync information from local to remote database.
schema of the system
Now I know replication can be a good idea for this.
but I don't know when my remote database has a problem and my system can't connected to remote database how to apply changes in local database to remote database?