| 31 | system user | | NULL | Connect | 3 | Waiting for an event from Coordinator | NULL |
| 32 | system user | | NULL | Connect | 3 | Waiting for an event from Coordinator | NULL |
| 33 | system user | | NULL | Connect | 3 | Waiting for an event from Coordinator | NULL |
| 34 | system user | | NULL | Connect | 3 | Waiting for an event from Coordinator | NULL |
+----+-------------+-----------+------+---------+------+--------------------------------------------------------+-----------------------+
7 rows in set (0.00 sec)
这样就成功的开启MySQL的5.7版本多线程主从复制,在配置好后在slave的datadir目录下会有根据slave_parallel_workers设置的线程数个数相同的线程文件:
最后再把配置好的变量参数写入my.cnf,使得下一次重启生效:
slave_parallel_workers = 4
slave_parallel_type= logical_clock
Ubuntu 16.04下实现MySQL主从复制