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

SEE ALSO

393       For more information, please refer to the MySQL Reference Manual, which
394       may already be installed locally and which is also available online at
395       http://dev.mysql.com/doc/.
396

AUTHOR

398       Oracle Corporation (http://dev.mysql.com/).
399
400
401
402MySQL 8.0                         11/26/2021                      MYSQLSHOW(1)
Impressum