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

发布于 2024-09-18 13:58:44 字数 136 浏览 4 评论 0原文

如何以特定的时间间隔使用服务器 mysql 数据库更新本地主机 MySql 数据库。 Web应用程序是用PHP编写的,数据库应该是MySql。

假设我在托管站点有一个数据库现在我想使用本地计算机上的本地主机数据库定期更新我的数据库。请建议我?

How it is possible to update localhost MySql database with server mysql database at particular interval. Web application is made in PHP and database should be in 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 ??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

°如果伤别离去 2024-09-25 13:58:44

听起来你需要使用 MySQL 的 复制 功能。这是演练,这是手册供参考。

值得注意的是,通过互联网(而不是本地网络)进行复制可能会很慢,并且您最终可能会得到一个从服务器,它比繁忙的主服务器晚几分钟甚至几个小时。另一种选择可能是定期 mysqldump 主数据库并复制它返回到您的本地计算机,尽管如果您的主服务器非常繁忙,您将锁定数据库并挂起查询,并且如果它非常大,此过程将花费很长时间。

Sounds like you need to use MySQL's replication feature. 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. 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文