如何执行双向MYSQL数据库同步和自动文件传输

I have two systems developed using PHP and MySQL database. Both systems run on the Apache webserver.System 1 is a website which is hosted remotely and allows applicants to submit internship applications and various supporting documents with different file formats allowed (pdf, word and png etc). These documents are uploaded to a temporal folder in the remote server where the website is being hosted.

System 2 is a management software in our office. It has some of the tables of system 1 (tables I want information to be syncronized between) and more. I want to be able to do two things.

  1. Synchronize only specific tables of system 2 (management software) with the database of System one (website).
  2. I also want to be able to fetch the uploaded documents from the temporal folder in the online server to a folder in our local server in the office on which the management software runs.

I have been studying the MySQL manual version 5.6 which explains MySQL replication neatly. But it focuses on One-way replication where CU (Create-Update) occur on one database ( Master) and Read on the other (Slave). It seems promising but not enough for my situation. I want both databases to allow CRUD (Create, Read, Update, Delete). Also, I want only a subset of the tables in the management software to synchronize with the database of the website.

I will grately appreciate any idea as I continue investigating.

SymmetricDS supports multi-master replication, file sync, and MySql.

The free open source version can be found at SymmetricDS.org

There is also a Pro version including a gui and support at JumpMind.com