简体   繁体   中英

Updating mysql localhost database from remote server

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..

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.

您可能希望在服务器上设置cron作业,该作业执行php脚本,该脚本每隔几分钟检查一次远程数据库中的新行,并将它们添加到本地数据库中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM