2009-09-16 14:03:18 +02:00
'\" t
2009-05-25 11:59:47 +02:00
. \" Title: \fBmysqlshow\fR
2009-09-16 14:03:18 +02:00
. \" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
. \" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
2010-04-28 15:06:11 +02:00
. \" Date: 04/06/2010
2009-05-25 11:59:47 +02:00
. \" Manual: MySQL Database System
. \" Source: MySQL 5.1
2009-09-16 14:03:18 +02:00
. \" Language: English
2009-05-25 11:59:47 +02:00
. \"
2010-04-28 15:06:11 +02:00
.TH "\FBMYSQLSHOW\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
2009-09-16 14:03:18 +02:00
. \" -----------------------------------------------------------------
. \" * set default formatting
. \" -----------------------------------------------------------------
2009-05-25 11:59:47 +02:00
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
2009-09-16 14:03:18 +02:00
. \" -----------------------------------------------------------------
. \" * MAIN CONTENT STARTS HERE *
. \" -----------------------------------------------------------------
. \" mysqlshow
. \" databases: displaying
. \" displaying: database information
. \" tables: displaying
. \" columns: displaying
. \" showing: database information
2009-05-25 11:59:47 +02:00
.SH "NAME"
mysqlshow \- display database, table, and column information
.SH "SYNOPSIS"
2009-09-16 14:03:18 +02:00
.HP \w '\fBmysqlshow\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIdb_name\fR\fR\fB\ [\fR\fB\fItbl_name\fR\fR\fB\ [\fR\fB\fIcol_name\fR\fR\fB]]]\fR\ 'u
2009-05-25 11:59:47 +02:00
\fB mysqlshow [\fR \fB \fI options\fR \fR \fB ] [\fR \fB \fI db_name\fR \fR \fB [\fR \fB \fI tbl_name\fR \fR \fB [\fR \fB \fI col_name\fR \fR \fB ]]]\fR
.SH "DESCRIPTION"
.PP
The
\fB mysqlshow\fR
2009-09-16 14:03:18 +02:00
client can be used to quickly see which databases exist, their tables, or a table\' s columns or indexes\& .
2009-05-25 11:59:47 +02:00
.PP
\fB mysqlshow\fR
provides a command\- line interface to several SQL
SHOW
2009-09-16 14:03:18 +02:00
statements\& . See
2010-04-28 15:06:11 +02:00
Section\ \& 12.4.5, \(lq SHOW Syntax\(rq \& . The same information can be obtained by using those statements directly\& . For example, you can issue them from the
2009-05-25 11:59:47 +02:00
\fB mysql\fR
2009-09-16 14:03:18 +02:00
client program\& .
2009-05-25 11:59:47 +02:00
.PP
Invoke
\fB mysqlshow\fR
like this:
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
shell> \fB mysqlshow [\fR \fB \fI options\fR \fR \fB ] [\fR \fB \fI db_name\fR \fR \fB [\fR \fB \fI tbl_name\fR \fR \fB [\fR \fB \fI col_name\fR \fR \fB ]]]\fR
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
If no database is given, a list of database names is shown\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
If no table is given, all matching tables in the database are shown\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
If no column is given, all matching columns and column types in the table are shown\& .
2009-05-25 11:59:47 +02:00
.RE
.PP
2009-09-16 14:03:18 +02:00
The output displays only the names of those databases, tables, or columns for which you have some privileges\& .
2009-05-25 11:59:47 +02:00
.PP
If the last argument contains shell or SQL wildcard characters (\(lq *\(rq ,
\(lq ?\(rq ,
\(lq %\(rq , or
2009-09-16 14:03:18 +02:00
\(lq _\(rq ), only those names that are matched by the wildcard are shown\& . If a database name contains any underscores, those should be escaped with a backslash (some Unix shells require two) to get a list of the proper tables or columns\& .
2009-05-25 11:59:47 +02:00
\(lq *\(rq
and
\(lq ?\(rq
characters are converted into SQL
\(lq %\(rq
and
\(lq _\(rq
2009-09-16 14:03:18 +02:00
wildcard characters\& . This might cause some confusion when you try to display the columns for a table with a
2009-05-25 11:59:47 +02:00
\(lq _\(rq
in the name, because in this case,
\fB mysqlshow\fR
2009-09-16 14:03:18 +02:00
shows you only the table names that match the pattern\& . This is easily fixed by adding an extra
2009-05-25 11:59:47 +02:00
\(lq %\(rq
2009-09-16 14:03:18 +02:00
last on the command line as a separate argument\& .
2009-05-25 11:59:47 +02:00
.PP
\fB mysqlshow\fR
2010-04-28 15:06:11 +02:00
supports the following options, which can be specified on the command line or in the
[mysqlshow]
and
[client]
option file groups\& .
\fB mysqlshow\fR
also supports the options for processing option files described at
2009-09-16 14:03:18 +02:00
Section\ \& 4.2.3.3.1, \(lq Command-Line Options that Affect Option-File Handling\(rq \& .
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: help option
. \" help option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- help\fR ,
\fB \- ?\fR
.sp
2009-09-16 14:03:18 +02:00
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
. \}
. \" mysqlshow: character-sets-dir option
. \" character-sets-dir option: mysqlshow
2013-06-13 00:13:23 +02:00
\fB \- \- character\- sets\- dir=\fR \fB \fI path\fR \fR ,
\fB \- c\fR
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
The directory where character sets are installed\& . See
2010-04-28 15:06:11 +02:00
Section\ \& 9.5, \(lq Character Set Configuration\(rq \& .
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: compress option
. \" compress option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- compress\fR ,
\fB \- C\fR
.sp
2009-09-16 14:03:18 +02:00
Compress all information sent between the client and the server if both support compression\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: count option
. \" count option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- count\fR
.sp
2009-09-16 14:03:18 +02:00
Show the number of rows per table\& . This can be slow for non\- MyISAM
tables\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: debug option
. \" debug option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- debug[=\fR \fB \fI debug_options\fR \fR \fB ]\fR ,
\fB \- # [\fR \fB \fI debug_options\fR \fR \fB ]\fR
.sp
2009-09-16 14:03:18 +02:00
Write a debugging log\& . A typical
2009-05-25 11:59:47 +02:00
\fI debug_options\fR
2009-09-16 14:03:18 +02:00
string is
\' d:t:o,\fI file_name\fR \' \& . The default is
\' d:t:o\' \& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: debug-check option
. \" debug-check option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- debug\- check\fR
.sp
2009-09-16 14:03:18 +02:00
Print some debugging information when the program exits\& . This option was added in MySQL 5\& .1\& .21\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: debug-info option
. \" debug-info option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- debug\- info\fR
.sp
2009-09-16 14:03:18 +02:00
Print debugging information and memory and CPU usage statistics when the program exits\& . This option was added in MySQL 5\& .1\& .14\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: default-character-set option
. \" default-character-set option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- default\- character\- set=\fR \fB \fI charset_name\fR \fR
.sp
Use
\fI charset_name\fR
2009-09-16 14:03:18 +02:00
as the default character set\& . See
2010-04-28 15:06:11 +02:00
Section\ \& 9.5, \(lq Character Set Configuration\(rq \& .
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2013-06-13 00:13:23 +02:00
. \" mysqlshow: defaults-extra-file option
. \" defaults-extra-file option: mysqlshow
\fB \- \- defaults\- extra\- file=\fR \fB \fI filename\fR \fR
.sp
Set \fB \fI filename\fR \fR as the file to read default options from after the global defaults files has been
read\& . Must be given as first option\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: defaults-file option
. \" defaults-file option: mysqlshow
\fB \- \- defaults\- file=\fR \fB \fI filename\fR \fR
.sp
Set \fB \fI filename\fR \fR as the file to read default options from, override global defaults files\& .
Must be given as first option\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-09-16 14:03:18 +02:00
. \" mysqlshow: host option
. \" host option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- host=\fR \fB \fI host_name\fR \fR ,
\fB \- h \fR \fB \fI host_name\fR \fR
.sp
2009-09-16 14:03:18 +02:00
Connect to the MySQL server on the given host\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: keys option
. \" keys option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- keys\fR ,
\fB \- k\fR
.sp
2009-09-16 14:03:18 +02:00
Show table indexes\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2013-06-13 00:13:23 +02:00
. \" mysqlshow: no-defaults option
. \" no-defaults option: mysqlshow
\fB \- \- no\- defaults\fR
.sp
Do not read default options from any option file\& . This must be given as the
first argument\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-09-16 14:03:18 +02:00
. \" mysqlshow: password option
. \" password option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- password[=\fR \fB \fI password\fR \fR \fB ]\fR ,
\fB \- p[\fR \fB \fI password\fR \fR \fB ]\fR
.sp
2009-09-16 14:03:18 +02:00
The password to use when connecting to the server\& . If you use the short option form (\fB \- p\fR ), you
2009-05-25 11:59:47 +02:00
\fI cannot\fR
2009-09-16 14:03:18 +02:00
have a space between the option and the password\& . If you omit the
2009-05-25 11:59:47 +02:00
\fI password\fR
value following the
\fB \- \- password\fR
or
\fB \- p\fR
2010-04-28 15:06:11 +02:00
option on the command line,
\fB mysqlshow\fR
prompts for one\& .
2009-09-16 14:03:18 +02:00
.sp
Specifying a password on the command line should be considered insecure\& . See
2010-04-28 15:06:11 +02:00
Section\ \& 5.3.2.2, \(lq End-User Guidelines for Password Security\(rq \& . You can use an option file to avoid giving the password on the command line\& .
2009-09-16 14:03:18 +02:00
.RE
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: pipe option
. \" pipe option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- pipe\fR ,
\fB \- W\fR
.sp
2010-04-28 15:06:11 +02:00
On Windows, connect to the server via a named pipe\& . This option applies only if the server supports named\- pipe connections\& .
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: port option
. \" port option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- port=\fR \fB \fI port_num\fR \fR ,
\fB \- P \fR \fB \fI port_num\fR \fR
.sp
2009-09-16 14:03:18 +02:00
The TCP/IP port number to use for the connection\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: protocol option
. \" protocol option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- protocol={TCP|SOCKET|PIPE|MEMORY}\fR
.sp
2009-09-16 14:03:18 +02:00
The connection protocol to use for connecting to the server\& . It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\& . For details on the allowable values, see
Section\ \& 4.2.2, \(lq Connecting to the MySQL Server\(rq \& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2013-06-13 00:13:23 +02:00
. \" mysqlshow: print-defaults option
. \" print-defaults option: mysqlshow
\fB \- \- print\- defaults\fR
.sp
Print the program argument list and exit\& .
This must be given as the first argument\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-09-16 14:03:18 +02:00
. \" mysqlshow: show-table-type option
. \" show-table-type option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- show\- table\- type\fR ,
\fB \- t\fR
.sp
Show a column indicating the table type, as in
2009-09-16 14:03:18 +02:00
SHOW FULL TABLES\& . The type is
2009-05-25 11:59:47 +02:00
BASE TABLE
or
2009-09-16 14:03:18 +02:00
VIEW\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: socket option
. \" socket option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- socket=\fR \fB \fI path\fR \fR ,
\fB \- S \fR \fB \fI path\fR \fR
.sp
For connections to
2009-09-16 14:03:18 +02:00
localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: SSL options
. \" SSL options: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- ssl*\fR
.sp
Options that begin with
\fB \- \- ssl\fR
2009-09-16 14:03:18 +02:00
specify whether to connect to the server via SSL and indicate where to find SSL keys and certificates\& . See
2010-04-28 15:06:11 +02:00
Section\ \& 5.5.6.3, \(lq SSL Command Options\(rq \& .
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: status option
. \" status option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- status\fR ,
\fB \- i\fR
.sp
2009-09-16 14:03:18 +02:00
Display extra information about each table\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: user option
. \" user option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- user=\fR \fB \fI user_name\fR \fR ,
\fB \- u \fR \fB \fI user_name\fR \fR
.sp
2009-09-16 14:03:18 +02:00
The MySQL user name to use when connecting to the server\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: verbose option
. \" verbose option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- verbose\fR ,
\fB \- v\fR
.sp
2009-09-16 14:03:18 +02:00
Verbose mode\& . Print more information about what the program does\& . This option can be used multiple times to increase the amount of information\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlshow: version option
. \" version option: mysqlshow
2009-05-25 11:59:47 +02:00
\fB \- \- version\fR ,
\fB \- V\fR
.sp
2009-09-16 14:03:18 +02:00
Display version information and exit\& .
.RE
2009-05-25 11:59:47 +02:00
.SH "COPYRIGHT"
2009-09-16 14:03:18 +02:00
.br
2009-05-25 11:59:47 +02:00
.PP
2010-04-28 15:06:11 +02:00
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
2009-05-25 11:59:47 +02:00
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
.PP
2009-09-16 14:03:18 +02:00
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
2009-05-25 11:59:47 +02:00
.SH "SEE ALSO"
For more information, please refer to the MySQL Reference Manual,
which may already be installed locally and which is also available
online at http://dev.mysql.com/doc/.
.SH AUTHOR
2009-09-16 14:03:18 +02:00
Sun Microsystems, Inc. (http://www.mysql.com/).