如题,

解决方案 »

  1.   

    SHOW SLAVE HOSTS
    用于显示当前使用主服务器注册的复制从属服务器的清单。不以--report-host=slave_name选项为开头的从属服务器不会显示在本清单中。需要在从服务器上的mysqld选项组上设置:
    report-host=slave_name如:在从上设置成report-host=slave_7
    则在主上执行:
    mysql> show slave hosts;
    +-----------+---------+------+-------------------+-----------+
    | Server_id | Host    | Port | Rpl_recovery_rank | Master_id |
    +-----------+---------+------+-------------------+-----------+
    |         2 | slave_7 | 3306 |                 0 |         1 |
    +-----------+---------+------+-------------------+-----------+