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
SHOW SLAVE HOSTS should be executed on a
server that acts as a replication master. The statement displays
information about servers that are or have been connected as
replication slaves, with each row of the result corresponding to
one slave server, as shown here:
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 slave server's
option file, or on the command line with
--server-id=.
value
Host: The host name of the slave server
as specified on the slave with the
--report-host option. This
can differ from the machine name as configured in the
operating system.
User: The slave server user name as,
specified on the slave with the
--report-user option.
Statement output includes this column only if the master
server is started with the
--show-slave-auth-info
option.
Password: The slave server password as,
specified on the slave with the
--report-password option.
Statement output includes this column only if the master
server is started with the
--show-slave-auth-info
option.
Port: The port on the master to which the
slave server is listening, as specified on the slave with
the --report-port option.
In MySQL 5.5.23 and later, a zero in this column means that
the slave port
(--report-port) was not set.
Prior to MySQL 5.5.23, 3306 was used as the default in such
cases (Bug #13333431).
Master_id: The unique server ID of the
master server that the slave server is replicating from.
This is the server ID of the server on which SHOW
SLAVE HOSTS is executed, so this same value is
listed for each row in the result.
Some MySQL versions report another variable,
Rpl_recovery_rank. This
variable was never used, and was removed in MySQL 5.5.3. (Bug
#13963)