1MYSQLSHOW(1) MariaDB 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. The same information can be obtained by using those
17 statements directly. For example, you can issue them from the mysql
18 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
37 are shown. If a database name contains any underscores, those should be
38 escaped with a backslash (some Unix shells require two) to get a list
39 of the proper tables or columns. “*” and “?” characters are converted
40 into SQL “%” and “_” wildcard characters. This might cause some
41 confusion when you try to display the columns for a table with a “_” in
42 the name, because in this case, mysqlshow shows you only the table
43 names that match the pattern. This is easily fixed by adding an extra
44 “%” last on the command 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] option file groups.
48 mysqlshow also supports the options for processing option files
49 described.
50
51 · --help, -?
52
53 Display a help message and exit.
54
55 · --character-sets-dir=path, -c path
56
57 The directory where character sets are installed.
58
59 · --compress, -C
60
61 Compress all information sent between the client and the server if
62 both support compression.
63
64 · --count
65
66 Show the number of rows per table. This can be slow for non-MyISAM
67 tables.
68
69 · --debug[=debug_options], -# [debug_options]
70
71 Write a debugging log. A typical debug_options string is
72 ´d:t:o,file_name´. The default is ´d:t:o´.
73
74 · --debug-check
75
76 Print some debugging information when the program exits.
77
78 · --debug-info
79
80 Print debugging information and memory and CPU usage statistics
81 when the program exits.
82
83 · --default-auth=name
84
85 Default authentication client-side plugin to use.
86
87 · --default-character-set=charset_name
88
89 Use charset_name as the default character set.
90
91 · --defaults-extra-file=filename
92
93 Set filename as the file to read default options from after the
94 global defaults files has been read. Must be given as first
95 option.
96
97 · --defaults-file=filename
98
99 Set filename as the file to read default options from, override
100 global defaults files. Must be given as first option.
101
102 · --defaults-group-suffix=suffix
103
104 In addition to the groups named on the command line, read groups
105 that have the given suffix.
106
107 · --host=host_name, -h host_name
108
109 Connect to the MariaDB server on the given host.
110
111 · --keys, -k
112
113 Show table indexes.
114
115 · --no-defaults
116
117 Do not read default options from any option file. This must be
118 given as the first argument.
119
120 · --password[=password], -p[password]
121
122 The password to use when connecting to the server. If you use the
123 short option form (-p), you cannot have a space between the option
124 and the password. If you omit the password value following the
125 --password or -p option on the command line, mysqlshow prompts for
126 one.
127
128 Specifying a password on the command line should be considered
129 insecure. You can use an option file to avoid giving the password
130 on the command line.
131
132 · --pipe, -W
133
134 On Windows, connect to the server via a named pipe. This option
135 applies only if the server supports named-pipe connections.
136
137 · --plugin-dir=dir_name
138
139 Directory for client-side plugins.
140
141 · --port=port_num, -P port_num
142
143 The TCP/IP port number to use for the connection.
144
145 · --protocol={TCP|SOCKET|PIPE|MEMORY}
146
147 The connection protocol to use for connecting to the server. It is
148 useful when the other connection parameters normally would cause a
149 protocol to be used other than the one you want.
150
151 · --print-defaults
152
153 Print the program argument list and exit. This must be given as
154 the first argument.
155
156 · --show-table-type, -t
157
158 Show a column indicating the table type, as in SHOW FULL TABLES.
159 The type is BASE TABLE or VIEW.
160
161 · --socket=path, -S path
162
163 For connections to localhost, the Unix socket file to use, or, on
164 Windows, the name of the named pipe to use.
165
166 · --ssl
167
168 Enable SSL for connection (automatically enabled with other flags).
169 Disable with --skip-ssl.
170
171 · --ssl-ca=name
172
173 CA file in PEM format (check OpenSSL docs, implies --ssl).
174
175 · --ssl-capath=name
176
177 CA directory (check OpenSSL docs, implies --ssl).
178
179 · --ssl-cert=name
180
181 X509 cert in PEM format (check OpenSSL docs, implies --ssl).
182
183 · --ssl-cipher=name
184
185 SSL cipher to use (check OpenSSL docs, implies --ssl).
186
187 · --ssl-key=name
188
189 X509 key in PEM format (check OpenSSL docs, implies --ssl).
190
191 · --ssl-crl=name
192
193 Certificate revocation list (check OpenSSL docs, implies --ssl).
194
195 · --ssl-crlpath=name
196
197 Certificate revocation list path (check OpenSSL docs, implies
198 --ssl).
199
200 · --ssl-verify-server-cert
201
202 Verify server's "Common Name" in its cert against hostname used
203 when connecting. This option is disabled by default.
204
205 · --status, -i
206
207 Display extra information about each table.
208
209 · --user=user_name, -u user_name
210
211 The MariaDB user name to use when connecting to the server.
212
213 · --verbose, -v
214
215 Verbose mode. Print more information about what the program does.
216 This option can be used multiple times to increase the amount of
217 information.
218
219 · --version, -V
220
221 Display version information and exit.
222
224 Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.,
225 2010-2015 MariaDB Foundation
226
227 This documentation is free software; you can redistribute it and/or
228 modify it only under the terms of the GNU General Public License as
229 published by the Free Software Foundation; version 2 of the License.
230
231 This documentation is distributed in the hope that it will be useful,
232 but WITHOUT ANY WARRANTY; without even the implied warranty of
233 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
234 General Public License for more details.
235
236 You should have received a copy of the GNU General Public License along
237 with the program; if not, write to the Free Software Foundation, Inc.,
238 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see
239 http://www.gnu.org/licenses/.
240
241
243 For more information, please refer to the MariaDB Knowledge Base,
244 available online at https://mariadb.com/kb/
245
247 MariaDB Foundation (http://www.mariadb.org/).
248
249
250
251MariaDB 10.3 9 May 2017 MYSQLSHOW(1)