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

SEE ALSO

417       For more information, please refer to the MySQL Reference Manual, which
418       may already be installed locally and which is also available online at
419       http://dev.mysql.com/doc/.
420

AUTHOR

422       Oracle Corporation (http://dev.mysql.com/).
423
424
425
426MySQL 8.0                         09/06/2019                      MYSQLSHOW(1)
Impressum