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