Question

Is it possible to automatically sync local MySql database with a hosted MySql database through internet connection.

Was it helpful?

Solution

Yes, you can do this by the following method:

  1. Create a shell script which exports data from the Hosted DB and then does a clean import into your local DB.
  2. The remote script exporting the DB, can be run directly on your hosted server and you can schedule it to run at pre-defined times.
  3. For the local side, run a script on your local system, which checks for the date-time stamp of the exported DB and then runs a import on your local DB.

This is the easiest and fastest implementable solution to your problem. Otherwise there are commercial tools available in the market, depending on the DB you have to sync, which can perform this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top