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 13.7.6, “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 are shown.
37       If a database name contains any underscores, those should be escaped
38       with a backslash (some Unix shells require two) to get a list of the
39       proper tables or columns.  * and ?  characters are converted into SQL %
40       and _ wildcard characters. This might cause some confusion when you try
41       to display the columns for a table with a _ in the name, because in
42       this case, mysqlshow shows you only the table names that match the
43       pattern. This is easily fixed by adding an extra % last on the command
44       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] groups of an option
48       file. For information about option files used by MySQL programs, see
49       Section 4.2.7, “Using Option Files”.
50
51       ·   --help, -?
52
53           Display a help message and exit.
54
55       ·   --bind-address=ip_address
56
57           On a computer having multiple network interfaces, use this option
58           to select which interface to use for connecting to the MySQL
59           server.
60
61       ·   --character-sets-dir=dir_name
62
63           The directory where character sets are installed. See
64           Section 10.14, “Character Set Configuration”.
65
66       ·   --compress, -C
67
68           Compress all information sent between the client and the server if
69           both support compression.
70
71       ·   --count
72
73           Show the number of rows per table. This can be slow for non-MyISAM
74           tables.
75
76       ·   --debug[=debug_options], -# [debug_options]
77
78           Write a debugging log. A typical debug_options string is
79           d:t:o,file_name. The default is d:t:o.
80
81       ·   --debug-check
82
83           Print some debugging information when the program exits.
84
85       ·   --debug-info
86
87           Print debugging information and memory and CPU usage statistics
88           when the program exits.
89
90       ·   --default-character-set=charset_name
91
92           Use charset_name as the default character set. See Section 10.14,
93           “Character Set Configuration”.
94
95       ·   --default-auth=plugin
96
97           A hint about the client-side authentication plugin to use. See
98           Section 6.3.10, “Pluggable Authentication”.
99
100       ·   --defaults-extra-file=file_name
101
102           Read this option file after the global option file but (on Unix)
103           before the user option file. If the file does not exist or is
104           otherwise inaccessible, an error occurs.  file_name is interpreted
105           relative to the current directory if given as a relative path name
106           rather than a full path name.
107
108           For additional information about this and other option-file
109           options, see Section 4.2.8, “Command-Line Options that Affect
110           Option-File Handling”.
111
112       ·   --defaults-file=file_name
113
114           Use only the given option file. If the file does not exist or is
115           otherwise inaccessible, an error occurs.  file_name is interpreted
116           relative to the current directory if given as a relative path name
117           rather than a full path name.
118
119           Exception: Even with --defaults-file, client programs read
120           .mylogin.cnf.
121
122           For additional information about this and other option-file
123           options, see Section 4.2.8, “Command-Line Options that Affect
124           Option-File Handling”.
125
126       ·   --defaults-group-suffix=str
127
128           Read not only the usual option groups, but also groups with the
129           usual names and a suffix of str. For example, mysqlshow normally
130           reads the [client] and [mysqlshow] groups. If the
131           --defaults-group-suffix=_other option is given, mysqlshow also
132           reads the [client_other] and [mysqlshow_other] groups.
133
134           For additional information about this and other option-file
135           options, see Section 4.2.8, “Command-Line Options that Affect
136           Option-File Handling”.
137
138       ·   --enable-cleartext-plugin
139
140           Enable the mysql_clear_password cleartext authentication plugin.
141           (See Section 6.5.1.4, “Client-Side Cleartext Pluggable
142           Authentication”.)
143
144       ·   --get-server-public-key
145
146           Request from the server the RSA public key that it uses for key
147           pair-based password exchange. This option applies to clients that
148           connect to the server using an account that authenticates with the
149           caching_sha2_password authentication plugin. For connections by
150           such accounts, the server does not send the public key to the
151           client unless requested. The option is ignored for accounts that do
152           not authenticate with that plugin. It is also ignored if RSA-based
153           password exchange is not needed, as is the case when the client
154           connects to the server using a secure connection.
155
156           If --server-public-key-path=file_name is given and specifies a
157           valid public key file, it takes precedence over
158           --get-server-public-key.
159
160           For information about the caching_sha2_password plugin, see
161           Section 6.5.1.3, “Caching SHA-2 Pluggable Authentication”.
162
163       ·   --host=host_name, -h host_name
164
165           Connect to the MySQL server on the given host.
166
167       ·   --keys, -k
168
169           Show table indexes.
170
171       ·   --login-path=name
172
173           Read options from the named login path in the .mylogin.cnf login
174           path file. A “login path” is an option group containing options
175           that specify which MySQL server to connect to and which account to
176           authenticate as. To create or modify a login path file, use the
177           mysql_config_editor utility. See mysql_config_editor(1).
178
179           For additional information about this and other option-file
180           options, see Section 4.2.8, “Command-Line Options that Affect
181           Option-File Handling”.
182
183       ·   --no-defaults
184
185           Do not read any option files. If program startup fails due to
186           reading unknown options from an option file, --no-defaults can be
187           used to prevent them from being read.
188
189           The exception is that the .mylogin.cnf file, if it exists, is read
190           in all cases. This permits passwords to be specified in a safer way
191           than on the command line even when --no-defaults is used.
192           (.mylogin.cnf is created by the mysql_config_editor utility. See
193           mysql_config_editor(1).)
194
195           For additional information about this and other option-file
196           options, see Section 4.2.8, “Command-Line Options that Affect
197           Option-File Handling”.
198
199       ·   --password[=password], -p[password]
200
201           The password to use when connecting to the server. If you use the
202           short option form (-p), you cannot have a space between the option
203           and the password. If you omit the password value following the
204           --password or -p option on the command line, mysqlshow prompts for
205           one.
206
207           Specifying a password on the command line should be considered
208           insecure. See Section 6.1.2.1, “End-User Guidelines for Password
209           Security”. You can use an option file to avoid giving the password
210           on the command line.
211
212       ·   --pipe, -W
213
214           On Windows, connect to the server using a named pipe. This option
215           applies only if the server supports named-pipe connections.
216
217       ·   --plugin-dir=dir_name
218
219           The directory in which to look for plugins. Specify this option if
220           the --default-auth option is used to specify an authentication
221           plugin but mysqlshow does not find it. See Section 6.3.10,
222           “Pluggable Authentication”.
223
224       ·   --port=port_num, -P port_num
225
226           The TCP/IP port number to use for the connection.
227
228       ·   --print-defaults
229
230           Print the program name and all options that it gets from option
231           files.
232
233           For additional information about this and other option-file
234           options, see Section 4.2.8, “Command-Line Options that Affect
235           Option-File Handling”.
236
237       ·   --protocol={TCP|SOCKET|PIPE|MEMORY}
238
239           The connection protocol to use for connecting to the server. It is
240           useful when the other connection parameters normally would cause a
241           protocol to be used other than the one you want. For details on the
242           permissible values, see Section 4.2.2, “Connecting to the MySQL
243           Server”.
244
245       ·   --secure-auth
246
247           This option was removed in MySQL 8.0.3.
248
249       ·   --server-public-key-path=file_name
250
251           The path name to a file containing a client-side copy of the public
252           key required by the server for RSA key pair-based password
253           exchange. The file must be in PEM format. This option applies to
254           clients that authenticate with the sha256_password or
255           caching_sha2_password authentication plugin. This option is ignored
256           for accounts that do not authenticate with one of those plugins. It
257           is also ignored if RSA-based password exchange is not used, as is
258           the case when the client connects to the server using a secure
259           connection.
260
261           If --server-public-key-path=file_name is given and specifies a
262           valid public key file, it takes precedence over
263           --get-server-public-key.
264
265           For sha256_password, this option applies only if MySQL was built
266           using OpenSSL.
267
268           For information about the sha256_password and caching_sha2_password
269           plugins, see Section 6.5.1.2, “SHA-256 Pluggable Authentication”,
270           and Section 6.5.1.3, “Caching SHA-2 Pluggable Authentication”.
271
272       ·   --shared-memory-base-name=name
273
274           On Windows, the shared-memory name to use, for connections made
275           using shared memory to a local server. The default value is MYSQL.
276           The shared-memory name is case-sensitive.
277
278           The server must be started with the --shared-memory option to
279           enable shared-memory connections.
280
281       ·   --show-table-type, -t
282
283           Show a column indicating the table type, as in SHOW FULL TABLES.
284           The type is BASE TABLE or VIEW.
285
286       ·   --socket=path, -S path
287
288           For connections to localhost, the Unix socket file to use, or, on
289           Windows, the name of the named pipe to use.
290
291       ·   --ssl*
292
293           Options that begin with --ssl specify whether to connect to the
294           server using SSL and indicate where to find SSL keys and
295           certificates. See Section 6.4.2, “Command Options for Encrypted
296           Connections”.
297
298       ·   --ssl-fips-mode={OFF|ON|STRICT} Controls whether to enable FIPS
299           mode on the client side. The --ssl-fips-mode option differs from
300           other --ssl-xxx options in that it is not used to establish
301           encrypted connections, but rather to affect which cryptographic
302           operations are permitted. See Section 6.6, “FIPS Support”.
303
304           These --ssl-fips-mode values are permitted:
305
306           ·   OFF: Disable FIPS mode.
307
308           ·   ON: Enable FIPS mode.
309
310           ·   STRICT: Enable “strict” FIPS mode.
311
312
313               Note
314               If the OpenSSL FIPS Object Module is not available, the only
315               permitted value for --ssl-fips-mode is OFF. In this case,
316               setting --ssl-fips-mode to ON or STRICT causes the client to
317               produce a warning at startup and to operate in non-FIPS mode.
318
319       ·   --status, -i
320
321           Display extra information about each table.
322
323       ·   --tls-ciphersuites=ciphersuite_list
324
325           For client programs, specifies which TLSv1.3 ciphersuites the
326           client permits for encrypted connections. The value is a list of
327           one or more colon-separated ciphersuite names. The ciphersuites
328           that can be named for this option depend on the SSL library used to
329           compile MySQL. For details, see Section 6.4.6, “Encrypted
330           Connection Protocols and Ciphers”.
331
332           This option was added in MySQL 8.0.16.
333
334       ·   --tls-version=protocol_list
335
336           The protocols the client permits for encrypted connections. The
337           value is a list of one or more comma-separated protocol names. The
338           protocols that can be named for this option depend on the SSL
339           library used to compile MySQL. For details, see Section 6.4.6,
340           “Encrypted Connection Protocols and Ciphers”.
341
342       ·   --user=user_name, -u user_name
343
344           The MySQL user name to use when connecting to the server.
345
346       ·   --verbose, -v
347
348           Verbose mode. Print more information about what the program does.
349           This option can be used multiple times to increase the amount of
350           information.
351
352       ·   --version, -V
353
354           Display version information and exit.
355
357       Copyright © 1997, 2019, Oracle and/or its affiliates. All rights
358       reserved.
359
360       This documentation is free software; you can redistribute it and/or
361       modify it only under the terms of the GNU General Public License as
362       published by the Free Software Foundation; version 2 of the License.
363
364       This documentation is distributed in the hope that it will be useful,
365       but WITHOUT ANY WARRANTY; without even the implied warranty of
366       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
367       General Public License for more details.
368
369       You should have received a copy of the GNU General Public License along
370       with the program; if not, write to the Free Software Foundation, Inc.,
371       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see
372       http://www.gnu.org/licenses/.
373
374

SEE ALSO

376       For more information, please refer to the MySQL Reference Manual, which
377       may already be installed locally and which is also available online at
378       http://dev.mysql.com/doc/.
379

AUTHOR

381       Oracle Corporation (http://dev.mysql.com/).
382
383
384
385MySQL 8.0                         02/20/2019                      MYSQLSHOW(1)
Impressum