To allow queries on a public server with data that accumulates on an internal server, a cron job to sync data tables can work well. It also can minimize security concerns and, while the data is then as old as the last sync, it can be kept reasonably up to date.

6 Steps total

Step 1: Install mysql-table-sync

An updated version is available through the site at http://www.xaprb.com/blog/2007/05/17/mysql-table-sync-093-released/It seems to have been pulled into being part of a much larger package and, although the mysql-table-sync part is still there it is not all that clear that it is totally as functional. The original 0.9.3 version that I use is attached and works great, though.

Step 2: Make sure that you have the database and tables you want to sync cloned between your internal server and the public one.

Without this, the sync will fail.

Step 3: Unzip the attached tarball where you are going to run your cron script from.

You can really put it anywhere. It is just easier to find by putting it in your directory of maintenance scripts. If you move it, change the path in the called script (you'll see this script in a couple more steps so don't bother worrying about it now).

This is called from the script that is yet to be presented to know which tables are to be sync'd.

Step 5: You'll also need to punch a hole through your firewall

This is to allow port 3306 connections from the single IP of your web server which really minimizes security concerns.

Step 6: And then run a variation of the also attached script

Here is the script that is called via the crontab. Change the usernames, password, database names, etc.
This script should be called from the public facing server so it pulls data rather than pushing it from the internal server.