简体   繁体   English

从服务器MySql数据库更新本地服务器MySql数据库

[英]Update Local Server MySql Database from the Server MySql Database

How it is possible to update localhost MySql database with server mysql database at particular interval. 如何以特定间隔使用服务器mysql数据库更新localhost MySql数据库。 Web application is made in PHP and database should be in MySql. Web应用程序是用PHP制作的,数据库应该在MySql中。

Suppose I have a Database at Hosting site Now i want to update my database at regular interval with Local Host Database at my Local Computer.Please suggest me ?? 假设我在托管站点上有一个数据库,现在我想定期用本地计算机上的本地主机数据库更新数据库。请建议我??

Sounds like you need to use MySQL's replication feature. 听起来您需要使用MySQL的复制功能。 Here's a walkthrough and here's the manual for reference. 这是一个演练 ,这是供参考的手册

It's worth noting that replication over the internet (rather than a local network) can be slow and you can end up with a slave that's minutes, even hours behind a busy master. 值得注意的是,通过Internet(而不是本地网络)进行的复制速度可能很慢,并且您最终可能会遇到一个奴隶,该奴隶仅需几分钟,甚至比繁忙的主人还要晚数小时。 Another option could be to periodically mysqldump the master database and copy it back to your local machine, although if your master is very busy you'll lock databases and hang queries, and if it's very large this process will take a long time. 另一个选择是定期mysqldump master数据库并将其复制回本地计算机,尽管如果master非常忙,则将锁定数据库并挂起查询,如果很大,则此过程将花费很长时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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