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 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 • --pipe, -W On Windows, connect to the server using a named pipe.
211 This option applies only if the server was started with the
212 named_pipe system variable enabled to support named-pipe
213 connections. In addition, the user making the connection must be a
214 member of the Windows group specified by the
215 named_pipe_full_access_group system variable.
216
217 • --plugin-dir=dir_name The directory in which to look for plugins.
218 Specify this option if the --default-auth option is used to specify
219 an authentication plugin but mysqlshow does not find it. See
220 Section 6.2.17, “Pluggable Authentication”.
221
222 • --port=port_num, -P port_num For TCP/IP connections, the port
223 number to use.
224
225 • --print-defaults Print the program name and all options that it
226 gets from option files.
227
228 For additional information about this and other option-file
229 options, see Section 4.2.2.3, “Command-Line Options that Affect
230 Option-File Handling”.
231
232 • --protocol={TCP|SOCKET|PIPE|MEMORY} The transport protocol to use
233 for connecting to the server. It is useful when the other
234 connection parameters normally result in use of a protocol other
235 than the one you want. For details on the permissible values, see
236 Section 4.2.7, “Connection Transport Protocols”.
237
238 • --server-public-key-path=file_name The path name to a file in PEM
239 format containing a client-side copy of the public key required by
240 the server for RSA key pair-based password exchange. This option
241 applies to clients that authenticate with the sha256_password or
242 caching_sha2_password authentication plugin. This option is ignored
243 for accounts that do not authenticate with one of those plugins. It
244 is also ignored if RSA-based password exchange is not used, as is
245 the case when the client connects to the server using a secure
246 connection.
247
248 If --server-public-key-path=file_name is given and specifies a
249 valid public key file, it takes precedence over
250 --get-server-public-key.
251
252 For sha256_password, this option applies only if MySQL was built
253 using OpenSSL.
254
255 For information about the sha256_password and caching_sha2_password
256 plugins, see Section 6.4.1.3, “SHA-256 Pluggable Authentication”,
257 and Section 6.4.1.2, “Caching SHA-2 Pluggable Authentication”.
258
259 • --shared-memory-base-name=name On Windows, the shared-memory name
260 to use for connections made using shared memory to a local server.
261 The default value is MYSQL. The shared-memory name is
262 case-sensitive.
263
264 This option applies only if the server was started with the
265 shared_memory system variable enabled to support shared-memory
266 connections.
267
268 • --show-table-type, -t Show a column indicating the table type, as
269 in SHOW FULL TABLES. The type is BASE TABLE or VIEW.
270
271 • --socket=path, -S path For connections to localhost, the Unix
272 socket file to use, or, on Windows, the name of the named pipe to
273 use.
274
275 On Windows, this option applies only if the server was started with
276 the named_pipe system variable enabled to support named-pipe
277 connections. In addition, the user making the connection must be a
278 member of the Windows group specified by the
279 named_pipe_full_access_group system variable.
280
281 • --ssl* Options that begin with --ssl specify whether to connect to
282 the server using encryption and indicate where to find SSL keys and
283 certificates. See the section called “Command Options for Encrypted
284 Connections”.
285
286 • --ssl-fips-mode={OFF|ON|STRICT} Controls whether to enable FIPS
287 mode on the client side. The --ssl-fips-mode option differs from
288 other --ssl-xxx options in that it is not used to establish
289 encrypted connections, but rather to affect which cryptographic
290 operations to permit. See Section 6.8, “FIPS Support”.
291
292 These --ssl-fips-mode values are permitted:
293
294 • OFF: Disable FIPS mode.
295
296 • ON: Enable FIPS mode.
297
298 • STRICT: Enable “strict” FIPS mode.
299
300
301 Note
302 If the OpenSSL FIPS Object Module is not available, the only
303 permitted value for --ssl-fips-mode is OFF. In this case,
304 setting --ssl-fips-mode to ON or STRICT causes the client to
305 produce a warning at startup and to operate in non-FIPS mode.
306
307 • --status, -i Display extra information about each table.
308
309 • --tls-ciphersuites=ciphersuite_list The permissible ciphersuites
310 for encrypted connections that use TLSv1.3. The value is a list of
311 one or more colon-separated ciphersuite names. The ciphersuites
312 that can be named for this option depend on the SSL library used to
313 compile MySQL. For details, see Section 6.3.2, “Encrypted
314 Connection TLS Protocols and Ciphers”.
315
316 This option was added in MySQL 8.0.16.
317
318 • --tls-version=protocol_list The permissible TLS protocols for
319 encrypted connections. The value is a list of one or more
320 comma-separated protocol names. The protocols that can be named for
321 this option depend on the SSL library used to compile MySQL. For
322 details, see Section 6.3.2, “Encrypted Connection TLS Protocols and
323 Ciphers”.
324
325 • --user=user_name, -u user_name The user name of the MySQL account
326 to use for connecting to the server.
327
328 • --verbose, -v Verbose mode. Print more information about what the
329 program does. This option can be used multiple times to increase
330 the amount of information.
331
332 • --version, -V Display version information and exit.
333
334 • --zstd-compression-level=level The compression level to use for
335 connections to the server that use the zstd compression algorithm.
336 The permitted levels are from 1 to 22, with larger values
337 indicating increasing levels of compression. The default zstd
338 compression level is 3. The compression level setting has no effect
339 on connections that do not use zstd compression.
340
341 For more information, see Section 4.2.8, “Connection Compression
342 Control”.
343
344 This option was added in MySQL 8.0.18.
345
347 Copyright © 1997, 2021, Oracle and/or its affiliates.
348
349 This documentation is free software; you can redistribute it and/or
350 modify it only under the terms of the GNU General Public License as
351 published by the Free Software Foundation; version 2 of the License.
352
353 This documentation is distributed in the hope that it will be useful,
354 but WITHOUT ANY WARRANTY; without even the implied warranty of
355 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
356 General Public License for more details.
357
358 You should have received a copy of the GNU General Public License along
359 with the program; if not, write to the Free Software Foundation, Inc.,
360 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see
361 http://www.gnu.org/licenses/.
362
363
365 For more information, please refer to the MySQL Reference Manual, which
366 may already be installed locally and which is also available online at
367 http://dev.mysql.com/doc/.
368
370 Oracle Corporation (http://dev.mysql.com/).
371
372
373
374MySQL 8.0 09/04/2021 MYSQLSHOW(1)