• <bdo id='SW0Zz'></bdo><ul id='SW0Zz'></ul>

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

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

        <tfoot id='SW0Zz'></tfoot>
      1. 两个数据库之间的Mysql数据库同步

        时间:2023-05-24
        1. <small id='u1SRW'></small><noframes id='u1SRW'>

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

          • <legend id='u1SRW'><style id='u1SRW'><dir id='u1SRW'><q id='u1SRW'></q></dir></style></legend>

                <tbody id='u1SRW'></tbody>
                • <bdo id='u1SRW'></bdo><ul id='u1SRW'></ul>

                  <tfoot id='u1SRW'></tfoot>
                • 本文介绍了两个数据库之间的Mysql数据库同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我们正在各个商店运行 Java PoS(销售点)应用程序,并使用 MySql 后端.我想让商店中的数据库与主机服务器上的数据库保持同步.

                  We are running a Java PoS (Point of Sale) application at various shops, with a MySql backend. I want to keep the databases in the shops synchronised with a database on a host server.

                  当商店发生一些变化时,它们应该在主机服务器上得到更新.我如何实现这一目标?

                  When some changes happen in a shop, they should get updated on the host server. How do I achieve this?

                  推荐答案

                  复制不是很难创建.

                  这里有一些不错的教程:

                  Here's some good tutorials:

                  http://www.ghacks.net/2009/04/09/set-up-mysql-database-replication/

                  http://dev.mysql.com/doc/refman/5.5/en/replication-howto.html

                  http://www.lassosoft.com/Beginners-Guide-to-MySQL-复制

                  这里有一些您必须牢记的简单规则(当然还有更多规则,但这是主要概念):

                  Here some simple rules you will have to keep in mind (there's more of course but that is the main concept):

                  1. 设置 1 个服务器(主)用于写入数据.
                  2. 设置 1 个或多个服务器(从属)用于读取数据.

                  这样可以避免错误.

                  例如:如果你的脚本插入到master和slave的同一张表中,你就会有重复的主键冲突.

                  For example: If your script insert into the same tables on both master and slave, you will have duplicate primary key conflict.

                  您可以查看奴隶"作为备份"与主服务器持有相同信息但不能直接添加数据的服务器,只能按照主服务器的指令进行操作.

                  You can view the "slave" as a "backup" server which hold the same information as the master but cannot add data directly, only follow what the master server instructions.

                  注意:当然,您可以从主站读取,也可以向从站写入,但请确保不要写入相同的表(主站到从站和从站到主站).

                  我建议监控您的服务器以确保一切正常.

                  I would recommend to monitor your servers to make sure everything is fine.

                  如果您需要其他帮助,请告诉我

                  Let me know if you need additional help

                  这篇关于两个数据库之间的Mysql数据库同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何从MySQL中的select中删除? 下一篇:如何遍历表的所有行?(MySQL)

                  相关文章

                      <bdo id='BZ0bf'></bdo><ul id='BZ0bf'></ul>

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

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

                    2. <tfoot id='BZ0bf'></tfoot>