• <tfoot id='yReGl'></tfoot>
      <bdo id='yReGl'></bdo><ul id='yReGl'></ul>

      <small id='yReGl'></small><noframes id='yReGl'>

    1. <i id='yReGl'><tr id='yReGl'><dt id='yReGl'><q id='yReGl'><span id='yReGl'><b id='yReGl'><form id='yReGl'><ins id='yReGl'></ins><ul id='yReGl'></ul><sub id='yReGl'></sub></form><legend id='yReGl'></legend><bdo id='yReGl'><pre id='yReGl'><center id='yReGl'></center></pre></bdo></b><th id='yReGl'></th></span></q></dt></tr></i><div id='yReGl'><tfoot id='yReGl'></tfoot><dl id='yReGl'><fieldset id='yReGl'></fieldset></dl></div>

        <legend id='yReGl'><style id='yReGl'><dir id='yReGl'><q id='yReGl'></q></dir></style></legend>

        如何在不同的mysql服务器上更新另一个表时自动更新一个表?

        How to update a table automatically as another table is updated on different mysql server?(如何在不同的mysql服务器上更新另一个表时自动更新一个表?)
          • <bdo id='z02nc'></bdo><ul id='z02nc'></ul>
            1. <legend id='z02nc'><style id='z02nc'><dir id='z02nc'><q id='z02nc'></q></dir></style></legend>

              <small id='z02nc'></small><noframes id='z02nc'>

              <i id='z02nc'><tr id='z02nc'><dt id='z02nc'><q id='z02nc'><span id='z02nc'><b id='z02nc'><form id='z02nc'><ins id='z02nc'></ins><ul id='z02nc'></ul><sub id='z02nc'></sub></form><legend id='z02nc'></legend><bdo id='z02nc'><pre id='z02nc'><center id='z02nc'></center></pre></bdo></b><th id='z02nc'></th></span></q></dt></tr></i><div id='z02nc'><tfoot id='z02nc'></tfoot><dl id='z02nc'><fieldset id='z02nc'></fieldset></dl></div>
            2. <tfoot id='z02nc'></tfoot>
                <tbody id='z02nc'></tbody>

                  本文介绍了如何在不同的mysql服务器上更新另一个表时自动更新一个表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  假设我有两个数据库 'db1' &'db2' 在不同的 mysql 服务器 'A' &分别是B".

                  Let's say I have two databases 'db1' & 'db2' on different mysql servers 'A' & 'B' respectively.

                  我想每 6 小时检查 'db2' 中的 'table1' 是否有更新,然后 'db1' 中的 'table1' 会自动更新.

                  I want to check every 6 hours if there is any update found in 'table1' in 'db2', then the 'table1' in 'db1' will be automatically updated.

                  如何使用触发器或 cron 作业来做到这一点?什么时候会被解雇?

                  How can I do that with trigger or a cron job? and when it will be fired?

                  推荐答案

                  你可以使用 cron 作业,只需每分钟运行一个 php 文件.

                  You could do with with a cron job, simply could run a php file every minute.

                  此文件可以检查 db2 中 table1 中的新行(将当前行数保存在文本文件中以进行比较,如果新计数 > 旧计数,则可以更新 db1 中的 table1.

                  this file can check for a new row in a table1 in db2 (saving current count of rows in a text file for comparison, and if new count > old count, then this can then update table1 in db1.

                  简单

                  但是@Charles 在评论中说的mysql复制会更好.

                  but mysql replication as @Charles said in the comment would be better.

                  这篇关于如何在不同的mysql服务器上更新另一个表时自动更新一个表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  smtp gmail server php mailer not working(smtp gmail服务器php邮件程序不工作)
                  Email goes in spam when I send it via others SMTP server(当我通过其他 SMTP 服务器发送电子邮件时,电子邮件进入垃圾邮件)

                    <tbody id='8xmAy'></tbody>
                  <i id='8xmAy'><tr id='8xmAy'><dt id='8xmAy'><q id='8xmAy'><span id='8xmAy'><b id='8xmAy'><form id='8xmAy'><ins id='8xmAy'></ins><ul id='8xmAy'></ul><sub id='8xmAy'></sub></form><legend id='8xmAy'></legend><bdo id='8xmAy'><pre id='8xmAy'><center id='8xmAy'></center></pre></bdo></b><th id='8xmAy'></th></span></q></dt></tr></i><div id='8xmAy'><tfoot id='8xmAy'></tfoot><dl id='8xmAy'><fieldset id='8xmAy'></fieldset></dl></div>

                    • <small id='8xmAy'></small><noframes id='8xmAy'>

                    • <tfoot id='8xmAy'></tfoot>
                        <legend id='8xmAy'><style id='8xmAy'><dir id='8xmAy'><q id='8xmAy'></q></dir></style></legend>

                          <bdo id='8xmAy'></bdo><ul id='8xmAy'></ul>