1、参考博客:
https://blog.csdn.net/wyb213080286/article/details/38493753/;
https://www.cnblogs.com/hstone16/p/13050481.html。
2、主从库确定(Linux系统):
在从库添加federated插件,具体操作如下:
(1)查询插件:以下是FEDERATED插件没有安装或者没有启用的情况;
mysql> show engines;
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| MyISAM | YES | MyISAM storage engine | NO | NO | NO