MySql phpMyAdmin: Replicating/Synchronizng two Database automatically

て烟熏妆下的殇ゞ 提交于 2019-11-30 19:34:20

问题


I have two same database on two different server, and I want to synchronize both database.

For example, If I do any process like Insert, Update, Delete, Alter, Drop, etc it also reflect on other database automatically.

I had tried it on my local server, but every time I have to do it manually.

Is there any way to do it automatically, suppose I Insert a record and it automatically inserted into other database.


回答1:


What you're talking about is called 'Replication'.

If you are going to be making changes to both databases and expect it to show up in the other, you need a Master/Master pair.

Have a read about it here: https://dba.stackexchange.com/questions/9424/best-way-to-setup-master-to-multi-master-replication




回答2:


The "synchronisation" feature you are looking for is called Replication.

A replication can be set up between a master and a slave machine.

It does not rely on a constant connection, but stores all changes on the master and replays all those changes on the slave once a connection is established.

Tuturial for you



来源:https://stackoverflow.com/questions/25685205/mysql-phpmyadmin-replicating-synchronizng-two-database-automatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!