0

Hello All,

My problem is, i have one database and application in web server, another application in local server which is having another database . But some tables are same in database server and in my local database.

I want to update these particular tables from data base server into my local database for only insert or updated rows.

Please suggest me to do this.

Edited by Shanti C: n/a

5
Contributors
15
Replies
16
Views
6 Years
Discussion Span
Last Post by Shanti C
Featured Replies
  • MySQL supports replication. Have your web database as the master and replicate it to your home server - which means in effect that only the changes are transferred to the replica. Or try the poor man's version: run your web database with a text log and play it from time … Read More

  • Its hard to give examples without knowing exactly what you are working with. Basically, wherever you have a MYSQL connection, you would need to replicate this for your additional server. Then where you have an INSERT or UPDATE statment make a connection to your database to update it. Read More

  • MySQL replication is the perfect solution if you have own the server or can make changes to mysql configuration file. Because setting up replication requires changes to my.cnf. Read More

0

What ever application is performing the inserts and updates, edit it to update both servers.

0

aslong as you have the IP address of the database and the correct user name and password you can update it. (This is ofcourse assuming that you keep the local system powered up and connected to the net)

0

SEOCoder has the best answer: Push the data when you have it. If that is not possible (for instance, your local system is not always available to the server), then you need a "pull" system.

If the web server table has a unique and growing key (timestamp, id), you can SELECT from the remote server where (whatever-it-is) > (whatever-it-was-last-time-i-did-this)

If not, please consider that to be a problem and fix it...

0

thanks all for your replies.
But how to update my local database table if any existing rows got updated in server database.

0

Your application would have to update the table, so in the same way you would update your local database every time an INSERT is perform you can do the same every time an UPDATE is performed.

If the purpose of this is to create a back up, you can just use PHPMYADMIN to create daily backup to ZIPPED files.

0

Thanks SEOCoder..

Your application would have to update the table, so in the same way you would update your local database every time an INSERT is perform you can do the same every time an UPDATE is performed.

can u give any example for this?

1

MySQL supports replication. Have your web database as the master and replicate it to your home server - which means in effect that only the changes are transferred to the replica.
Or try the poor man's version: run your web database with a text log and play it from time to time into your local installation.

Votes + Comments
thanks
1

Its hard to give examples without knowing exactly what you are working with.

Basically, wherever you have a MYSQL connection, you would need to replicate this for your additional server. Then where you have an INSERT or UPDATE statment make a connection to your database to update it.

Votes + Comments
thanks
1

MySQL replication is the perfect solution if you have own the server or can make changes to mysql configuration file. Because setting up replication requires changes to my.cnf.

Votes + Comments
Thanks
0

thanks smantscheff,mwasif and SEOcoder for all your suggestions.
I will check all these suggestions.
thanks again.

0

Thank you so much mwasif.
but i have one doubt,
can replication be done between remote database server and local database server???

Edited by Shanti C: n/a

0

Of course. Replication is a mechanism to spread a master database to several slave locations. If you can establish establish a connection between your remote and your local machine, then you can set up replication.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.