'\" t
.\" Title: \fBmysqlrplshow\fR
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 08/01/2016
.\" Manual: MySQL Utilities
.\" Source: MySQL 1.6.3
.\" Language: English
.\"
.TH "\FBMYSQLRPLSHOW\FR" "1" "08/01/2016" "MySQL 1\&.6\&.3" "MySQL Utilities"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
mysqlrplshow \- Show Slaves for Master Server
.SH "SYNOPSIS"
.HP \w'\fBmysqlrplshow\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
\fBmysqlrplshow [\fR\fB\fIoptions\fR\fR\fB]\fR
.SH "DESCRIPTION"
.PP
This utility shows the replication slaves for a master\&. It prints a graph of the master and the slaves connected labeling each with the host name and port number\&.
.PP
You must specify the
\fB\-\-discover\-slaves\-login \fR
option to provide the user name and password to discover any slaves in the topology\&.
.PP
To explore the slaves for each client, use the
\fB\-\-recurse\fR
option\&. This causes the utility to connect to each slave found and attempt to determine whether it has any slaves\&. If slaves are found, the process continues until the slave is found in the list of servers serving as masters (a circular topology)\&. The graph displays the topology with successive indents\&. A notation is made for circular topologies\&.
.PP
If you use the
\fB\-\-recurse\fR
option, the utility attempts to connect to the slaves using the user name and password provided for the master\&. By default, if the connection attempt fails, the utility throws an error and stops\&. To change this behavior, use the
\fB\-\-prompt\fR
option, which permits the utility to prompt for the user name and password for each slave that fails to connect\&. You can also use the
\fB\-\-num\-retries=n\fR
option to reattempt a failed connection \*(Aqn\*(Aq times before the utility fails\&.
.PP
An example graph for a typical topology with relay slaves is shown here:
.sp
.if n \{\
.RS 4
.\}
.nf
# Replication Topology Graph::
localhost:3311 (MASTER)
|
+\-\-\- localhost:3310 \- (SLAVE)
|
+\-\-\- localhost:3312 \- (SLAVE + MASTER)
|
+\-\-\- localhost:3313 \- (SLAVE)
.fi
.if n \{\
.RE
.\}
.PP
MASTER,
SLAVE, and
SLAVE+MASTER
indicate that a server is a master only, slave only, and both slave and master, respectively\&.
.PP
A circular replication topology is shown like this, where
<\-\->
indicates circularity:
.sp
.if n \{\
.RS 4
.\}
.nf
# Replication Topology Graph
localhost:3311 (MASTER)
|
+\-\-\- localhost:3312 \- (SLAVE + MASTER)
|
+\-\-\- localhost:3313 \- (SLAVE + MASTER)
|
+\-\-\- localhost:3311 <\-\-> (SLAVE)
.fi
.if n \{\
.RE
.\}
.PP
To produce a column list in addition to the graph, specify the
\fB\-\-show\-list\fR
option\&. In this case, to specify how to display the list, use one of the following values with the
\fB\-\-format\fR
option:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBgrid\fR
(default)
.sp
Display output in grid or table format like that of the
\fBmysql\fR
client command\-line tool\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBcsv\fR
.sp
Display output in comma\-separated values format\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBtab\fR
.sp
Display output in tab\-separated format\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBvertical\fR
.sp
Display output in single\-column format like that of the
\eG
command for the
\fBmysql\fR
client command\-line tool\&.
.RE
.PP
The utility uses of the
\fBSHOW SLAVE HOSTS\fR
statement to determine which slaves the master has\&. If you want to use the
\fB\-\-recurse\fR
option, slaves should have been started with the
\-\-report\-host
and
\-\-report\-port
options set to their actual host name and port number or the utility may not be able to connect to the slaves to determine their own slaves\&.
OPTIONS.PP
\fBmysqlrplshow\fR
accepts the following command\-line options:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-help
.sp
Display a help message and exit\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-license
.sp
Display license information and exit\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-discover\-slaves\-login=
.sp
Supply the user and password in the form [:] or for discovering slaves and relay slaves in the topology\&. For example, \-\-discover=joe:secret will use \*(Aqjoe\*(Aq as the user and \*(Aqsecret\*(Aq as the password for each discovered slave\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-format=, \-f
.sp
Specify the display format for column list output\&. Permitted format values are
\fBgrid\fR,
\fBcsv\fR,
\fBtab\fR, and
\fBvertical\fR\&. The default is
\fBgrid\fR\&. This option applies only if
\fB\-\-show\-list\fR
is given\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-master=