Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.7Mb
PDF (A4) - 35.8Mb
PDF (RPM) - 34.8Mb
EPUB - 8.7Mb
HTML Download (TGZ) - 8.5Mb
HTML Download (Zip) - 8.5Mb
HTML Download (RPM) - 7.3Mb
Eclipse Doc Plugin (TGZ) - 9.3Mb
Eclipse Doc Plugin (Zip) - 11.5Mb
Man Pages (TGZ) - 203.7Kb
Man Pages (Zip) - 309.1Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual

14.7.5.33 SHOW SLAVE HOSTS Syntax

SHOW SLAVE HOSTS

Displays a list of replication slaves currently registered with the master.

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 | Slave_UUID                           |
+-----------+-----------+-------+-----------+--------------------------------------+
|  192168010 | iconnect2 | 3306 | 192168011 | 14cb6624-7f93-11e0-b2c0-c80aa9429562 |
| 1921680101 | athena    | 3306 | 192168011 | 07af4990-f41f-11df-a566-7ac56fdaf645 |
+------------+-----------+------+-----------+--------------------------------------+
  • 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.

    A zero in this column means that the slave port (--report-port) was not set.

  • 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.

  • Slave_UUID: The globally unique ID of this slave, as generated on the slave and found in the slave's auto.cnf file.


User Comments
  Posted by Galina Keremidska on November 6, 2006
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.
  Posted by Galina Keremidska on November 6, 2006
my mistake: not daisy-chain replication I mean multi-master replication
  Posted by Baron Schwartz on December 6, 2007
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.
Sign Up Login You must be logged in to post a comment.