I currently have a MySQL database hosted on a remote server (Server A). This database have to stay there because this remote server is very secure. Our online website use this database to display information. The website can also insert news fields.
Our local server (Server B) is connected by VPN to server A. And no more connections are allowed by VPN. Server B host also our intranet (this intranet use the database).
On the same network of Server B, we have +- 5 computers that need to query the database. But they can not have a VPN access.
I see 2 options to allow the local computers to query the remote DB.
MySQL Proxy
Installed on Server B. We will redirect the queries to Server A. As server B is connected by VPN it will no create problems.
Master to master replication
The mySQL database hosted on server A will be replicated on server B. Both databases will be used. If the website fill the DB on server A, the changes will be on the DB hosted on B. And vice versa.
What is the best solution? The master to master replication may cause inconsistencies? One solution is more efficient?