Man page for mk-slave-find
August 24, 2007 – 5:35 pmMK-SLAVE-FIND
Section: User Contributed Perl Documentation (1)
Updated: 2008-06-01
Index
Return to Main Contents
NAME
mk-slave-find - Find MySQL replication slaves and execute commands on them.
SYNOPSIS
mk-slave-find
DESCRIPTION
mk-slave-find connects to a MySQL replication master and finds its slaves.
Currently the only thing it can do is print a tree-like view of the replication
hierarchy.
DOWNLOADING
You can download Maatkit from the Sourceforge website at
<http://sourceforge.net/projects/maatkit>, or you can get any of the tools
easily with a command like the following:
wget http://www.maatkit.org/get/toolname
or
wget http://www.maatkit.org/trunk/toolname
Where "toolname" can be replaced with the name (or fragment of a name) of any
of the Maatkit tools. Once downloaded, they’re ready to run; no installation is
needed. The first URL gets the latest released version of the tool, and the
second gets the latest trunk code from Subversion.
OPTIONS
- –askpass
Prompt for a password when connecting to MySQL.
- –charset
Enables character set settings in Perl and MySQL. If the value is "utf8", sets
Perl’s binmode on STDOUT to utf8, passes the "mysql_enable_utf8" option to
DBD::mysql, and runs "SET NAMES UTF8" after connecting to MySQL. Any other
value sets binmode on STDOUT without the utf8 layer, and runs "SET NAMES" after
connecting to MySQL.
- –database
Database to use.
- –defaults-file
Only read default options from the given file.
- –help
Show a brief help message and exit.
- –host
Connect to host.
- –password
Password to use when connecting.
- –port
Port number to use for connection.
Print the replication hierarchy as a tree.
- –recurse
Number of levels to recurse in the hierarchy. Default is infinite.This works by examining the output of "SHOW PROCESSLIST", or "SHOW SLAVE
HOSTS" if no slave connections are found.
- –setvars
Specify any variables you want to be set immediately after connecting to MySQL.
These will be included in a "SET" command.
- –socket
Socket file to use for connection.
- –user
User for login if not current user.
- –version
Output version information and exit.
SYSTEM REQUIREMENTS
You need Perl, DBI, DBD::mysql, and some core packages that ought to be
installed in any reasonably new version of Perl.
EXIT STATUS
Successful exit status is 0. Any other value represents the exit status of
the Perl process itself.
ENVIRONMENT
The environment variable "MKDEBUG" enables verbose debugging output in all of
the Maatkit tools:
MKDEBUG=1 mk-….
BUGS
If you find bugs, need features, etc please use the bug tracker, forums, and
mailing lists at http://sourceforge.net/projects/maatkit.
Please include the complete command-line used to reproduce the problem you are
seeing, the version of all MySQL servers involved, the complete output of the
tool when run with “–version”, and if possible, debugging output produced by
running with the "MKDEBUG=1" environment variable.
COPYRIGHT, LICENSE AND WARRANTY
This program is copyright (c) 2007 Baron Schwartz. Feedback and improvements
are welcome.
THIS PROGRAM IS PROVIDED “AS IS” AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, version 2; OR the Perl Artistic License. On UNIX and similar
systems, you can issue `man perlgpl’ or `man perlartistic’ to read these
licenses.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA.
AUTHOR
VERSION
This manual page documents Ver 1.0.1 Distrib 1972 $Revision: 1970 $.
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- DOWNLOADING
- OPTIONS
- SYSTEM REQUIREMENTS
- EXIT STATUS
- ENVIRONMENT
- BUGS
- COPYRIGHT, LICENSE AND WARRANTY
- AUTHOR
- VERSION