SHOW SLAVE HOSTS
Displays a list of replication slaves currently registered with
the master. (Before MySQL 5.5.3, only slaves started with the
--report-host=
option are visible in this list.)
host_name
The list is displayed on any server (not just the master server). The output looks like this:
mysql> SHOW SLAVE HOSTS
;
+------------+-----------+------+-----------+
| Server_id | Host | Port | Master_id |
+------------+-----------+------+-----------+
| 192168010 | iconnect2 | 3306 | 192168011 |
| 1921680101 | athena | 3306 | 192168011 |
+------------+-----------+------+-----------+
Server_id
: The unique server ID of the
slave server, as configured in the server's option file, or
on the command line with
--server-id=
.
value
Host
: The host name of the slave server,
as configured in the server's option file, or on the command
line with
--report-host=
.
Note that this can differ from the machine name as
configured in the operating system.
host_name
Port
: The port the slave server is
listening on.
Master_id
: The unique server ID of the
master server that the slave server is replicating from.
Some MySQL versions report another variable,
Rpl_recovery_rank
. This
variable was never used, and was removed in MySQL 5.5.3.
(Bug#13963)
User Comments
SHOW SLAVE HOSTS syntax doesn't display a list of replication slaves when it's configured a daizy-chain replication - A->B->A. When both servers act as masters i.e there's not server breakdown, both servers replicate to each other. So at one time one of them will act as slave so I don't understand why its options wouldn't be visible in this list.
my mistake: not daisy-chain replication I mean multi-master replication
The slave's --report-X parameters have a lot to do with what appears here. They control the hostname, port, username and password. The username and password appear only if --show-slave-auth-info is set on the master.
Add your own comment.