I have question pertaining to MySQL database. I have more than one MySQL databases. One is from the web hosting service and another is from in house. I wish to communicate with the MySQL DB from web hosting service with in house. Currently I am trying to sync the online DB with in house DB with a text file. I simply use the PDO to read off the data from in house DB and convert it to text file. I upload this text file through FTP to the web hosting site and use the PDO to read of the text file and insert the data to online database. If I need the data from online, I simply reverse above process along with email notification with an attachment of the data.
Is there a better way that I can sync the data tables from web host service with the data tables from in house MySQL DB? How can I accomplish this?
Here are the conditions:
1. the company can tolerate few second of database update which does not need to be up to the second but will be better if can achieve the full sync in few seconds.
2. table columns ranges from 6 to 10 and rows are between 10k to 50K of rows per table.