Mysql – Simple MySQL table copy from one server to another

MySQLPHP

this question has kindof been answered in a number of ways. Nothing that quite fits the bill (as far as I understand it).

I have MySQL Table X on Server A. I would like an exact copy of this table, to be cloned on 3 other servers. Table X is quite big, and will get bigger. Currently 500,000 records.

Nothing gets deleted from that table, only added. So, don't really want to copy the whole big table across every time. Some kind of incremental solution, to pull across only the new record data on Table X, to Servers B, C and D. Is that possible?

I am running PHP on both servers. If it makes a difference – Server A is PHP4, and Servers B,C and D are PHP5.

If it were being copied over to only 1 other server – I could somehow mark records on Server A, as "already copied" – and only copy across records not flagged as such. I guess, I could add fields on Table X, to say "copied to Server B", "to Server C" etc. But, considering all this extra data will need to be copied to all other Servers too – it seems like a lot of dead data hanging around. Hopefully there is a better way.

I do not have root access or command line access. Some suggestions on Stackoverflow had solutions involving these.

Our old programmer, set up something across these servers before – where any change on Server A mysql, would immediately be mirrored on mysql on Server B. But, that was for the whole database, not 1 single table. And, he had access to command line etc. If there is a good solution there, I could speak to the server hosts and ask them to help me set it up?

Apologies if the question seems a bit dumb, I've never done this before (obviously). 🙂 Any pointers or guidance you can offer will be appreciated.

Many thanks.

Best Answer

It sounds like your old programmer had a master -> slave setup which is a really good way to back up your whole database; any command run on the master is then replicated over to the slave. This seems to fit what you need, not sure if you can specify it for just one table. However there is a viable argument for keeping your whole DB backed up.