We have a PHP/Symfony 2 application using MySQL as the database. The database contains a large amount of data.

The application is deployed to a separate server(s) and an empty/clean version of the database deployed. The application is then run on a local network as the application is used where internet access is not always available (hospitals, banks etc).

Once the application has collated all the information are there any solutions for replaying the data back to the original database?

We are not using Master/Slave as we do not want the Slaves to contain all data from the original database.

  • From here - something like mysqldump --tables myTable --where="id < 1000" (1000 is just a sample - you would obviously choose your own query(ies) to match your own data retention requirements). Check out the thread for other tips. – Vérace Jun 14 '15 at 15:12
  • Thanks, the solutions you mentioned are based around extracting data out from one system, without any mention about importing data back in. Are there options using the binlog to record the inserts/deletes/updates and then playing these back to the original data source? – Paul M Jun 15 '15 at 15:22

When using master/slave you do not need to replicate the all instance. You can go up the the table with the replicate-wild-do-table parameter.

May be this could help you in what you are trying to do

| improve this answer | |

There are an storage engine called FEDERATED for MySQL. You can replicate just some tables and any change in any database affect the other. You can evaluate if federated tables resolve your problem. Federated

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.