1MYSQLSHOW(1)                 MySQL Database System                MYSQLSHOW(1)
2
3
4

NAME

6       mysqlshow - display database, table, and column information
7

SYNOPSIS

9       mysqlshow [options] [db_name [tbl_name [col_name]]]
10

DESCRIPTION

12       The mysqlshow client can be used to quickly see which databases exist,
13       their tables, or a table´s columns or indexes.
14
15       mysqlshow provides a command-line interface to several SQL SHOW
16       statements. See Section 12.4.5, “SHOW Syntax”. The same information can
17       be obtained by using those statements directly. For example, you can
18       issue them from the mysql client program.
19
20       Invoke mysqlshow like this:
21
22           shell> mysqlshow [options] [db_name [tbl_name [col_name]]]
23
24       ·   If no database is given, a list of database names is shown.
25
26       ·   If no table is given, all matching tables in the database are
27           shown.
28
29       ·   If no column is given, all matching columns and column types in the
30           table are shown.
31
32       The output displays only the names of those databases, tables, or
33       columns for which you have some privileges.
34
35       If the last argument contains shell or SQL wildcard characters (“*”,
36       “?”, “%”, or “_”), only those names that are matched by the wildcard
37       are shown. If a database name contains any underscores, those should be
38       escaped with a backslash (some Unix shells require two) to get a list
39       of the proper tables or columns.  “*” and “?”  characters are converted
40       into SQL “%” and “_” wildcard characters. This might cause some
41       confusion when you try to display the columns for a table with a “_” in
42       the name, because in this case, mysqlshow shows you only the table
43       names that match the pattern. This is easily fixed by adding an extra
44       “%” last on the command line as a separate argument.
45
46       mysqlshow supports the following options, which can be specified on the
47       command line or in the [mysqlshow] and [client] option file groups.
48       mysqlshow also supports the options for processing option files
49       described at Section 4.2.3.3.1, “Command-Line Options that Affect
50       Option-File Handling”.
51
52       ·   --help, -?
53
54           Display a help message and exit.
55
56       ·   --character-sets-dir=path, -c
57
58           The directory where character sets are installed. See Section 9.5,
59           “Character Set Configuration”.
60
61       ·   --compress, -C
62
63           Compress all information sent between the client and the server if
64           both support compression.
65
66       ·   --count
67
68           Show the number of rows per table. This can be slow for non-MyISAM
69           tables.
70
71       ·   --debug[=debug_options], -# [debug_options]
72
73           Write a debugging log. A typical debug_options string is
74           ´d:t:o,file_name´. The default is ´d:t:o´.
75
76       ·   --debug-check
77
78           Print some debugging information when the program exits. This
79           option was added in MySQL 5.1.21.
80
81       ·   --debug-info
82
83           Print debugging information and memory and CPU usage statistics
84           when the program exits. This option was added in MySQL 5.1.14.
85
86       ·   --default-character-set=charset_name
87
88           Use charset_name as the default character set. See Section 9.5,
89           “Character Set Configuration”.
90
91       ·   --defaults-extra-file=filename
92
93           Set filename as the file to read default options from after the
94           global defaults files has been read.  Must be given as first
95           option.
96
97       ·   --defaults-file=filename
98
99           Set filename as the file to read default options from, override
100           global defaults files.  Must be given as first option.
101
102       ·   --host=host_name, -h host_name
103
104           Connect to the MySQL server on the given host.
105
106       ·   --keys, -k
107
108           Show table indexes.
109
110       ·   --no-defaults
111
112           Do not read default options from any option file. This must be
113           given as the first argument.
114
115       ·   --password[=password], -p[password]
116
117           The password to use when connecting to the server. If you use the
118           short option form (-p), you cannot have a space between the option
119           and the password. If you omit the password value following the
120           --password or -p option on the command line, mysqlshow prompts for
121           one.
122
123           Specifying a password on the command line should be considered
124           insecure. See Section 5.3.2.2, “End-User Guidelines for Password
125           Security”. You can use an option file to avoid giving the password
126           on the command line.
127
128       ·   --pipe, -W
129
130           On Windows, connect to the server via a named pipe. This option
131           applies only if the server supports named-pipe connections.
132
133       ·   --port=port_num, -P port_num
134
135           The TCP/IP port number to use for the connection.
136
137       ·   --protocol={TCP|SOCKET|PIPE|MEMORY}
138
139           The connection protocol to use for connecting to the server. It is
140           useful when the other connection parameters normally would cause a
141           protocol to be used other than the one you want. For details on the
142           allowable values, see Section 4.2.2, “Connecting to the MySQL
143           Server”.
144
145       ·   --print-defaults
146
147           Print the program argument list and exit.  This must be given as
148           the first argument.
149
150       ·   --show-table-type, -t
151
152           Show a column indicating the table type, as in SHOW FULL TABLES.
153           The type is BASE TABLE or VIEW.
154
155       ·   --socket=path, -S path
156
157           For connections to localhost, the Unix socket file to use, or, on
158           Windows, the name of the named pipe to use.
159
160       ·   --ssl*
161
162           Options that begin with --ssl specify whether to connect to the
163           server via SSL and indicate where to find SSL keys and
164           certificates. See Section 5.5.6.3, “SSL Command Options”.
165
166       ·   --status, -i
167
168           Display extra information about each table.
169
170       ·   --user=user_name, -u user_name
171
172           The MySQL user name to use when connecting to the server.
173
174       ·   --verbose, -v
175
176           Verbose mode. Print more information about what the program does.
177           This option can be used multiple times to increase the amount of
178           information.
179
180       ·   --version, -V
181
182           Display version information and exit.
183
185       Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
186
187       This documentation is free software; you can redistribute it and/or
188       modify it only under the terms of the GNU General Public License as
189       published by the Free Software Foundation; version 2 of the License.
190
191       This documentation is distributed in the hope that it will be useful,
192       but WITHOUT ANY WARRANTY; without even the implied warranty of
193       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
194       General Public License for more details.
195
196       You should have received a copy of the GNU General Public License along
197       with the program; if not, write to the Free Software Foundation, Inc.,
198       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see
199       http://www.gnu.org/licenses/.
200
201

SEE ALSO

203       For more information, please refer to the MySQL Reference Manual, which
204       may already be installed locally and which is also available online at
205       http://dev.mysql.com/doc/.
206

AUTHOR

208       Sun Microsystems, Inc. (http://www.mysql.com/).
209
210
211
212MySQL 5.1                         04/06/2010                      MYSQLSHOW(1)
Impressum