Reputation: 51
I have two tables with same rows and columns one is on my localhost and second is on a remote server.
What I want is that if some one will add any data to my online remote server it should make an entry automatically to my localhost database.
Is there any way to use a trigger or anything else I can do..
Upvotes: 1
Views: 1131
Reputation: 519
You may want to set up a cron job on your server that executes a php script that checks for new rows in your remote database every few minutes and adds them to the local database.
Upvotes: 0
Reputation: 70460
You are looking for Replication. Note that you could do it with a FEDERATED table, but that is extremely slow at best, and should not be used because of both reliability & performance reasons.
Upvotes: 1