编辑:示例如果一台服务器关闭,另一台服务器具有相同的数据,我将可以使用它。
我想要实现的目标:
服务器1 - > DBExample
INSERT INTO DBExample (idExample, nameExample) VALUES (123, 'Example');
SELECT * FROM DBExample;
+-----------+-------------+
| idExample | nameExample |
+-----------+-------------+
| 123 | Example |
+-----------+-------------+
服务器2 - > DBExample2
SELECT * FROM DBExample2;
+-----------+-------------+
| idExample | nameExample |
+-----------+-------------+
| 123 | Example |
+-----------+-------------+
反之亦然:
服务器2 - > DBExample2
INSERT INTO DBExample2 (idExample, nameExample) VALUES (1234, 'Example2');
SELECT * FROM DBExample;
+-----------+-------------+
| idExample | nameExample |
+-----------+-------------+
| 123 | Example |
| 1234 | Example2 |
+-----------+-------------+
服务器1 - > DBExample
SELECT * FROM DBExample;
+-----------+-------------+
| idExample | nameExample |
+-----------+-------------+
| 123 | Example |
| 1234 | Example2 |
+-----------+-------------+
答案 0 :(得分:0)