mysqlshow
— Display Database, Table, and Column Information
313
mysqlshow
provides a command-line interface to several SQL
SHOW
statements. See
Section 13.7.5,
“
SHOW
Syntax”
. The same information can be obtained by using those statements directly. For
example, you can issue them from the
mysql
client program.
Invoke
mysqlshow
like this:
shell>
mysqlshow [options] [db_name [tbl_name [col_name]]]
• If no database is given, a list of database names is shown.
• If no table is given, all matching tables in the database are shown.
• If no column is given, all matching columns and column types in the table are shown.
The output displays only the names of those databases, tables, or columns for which you have some
privileges.
If the last argument contains shell or SQL wildcard characters (“
*
”, “
?
”, “
%
”, or “
_
”), only those names
that are matched by the wildcard are shown. If a database name contains any underscores, those
should be escaped with a backslash (some Unix shells require two) to get a list of the proper tables
or columns. “
*
” and “
?
” characters are converted into SQL “
%
” and “
_
” wildcard characters. This might
cause some confusion when you try to display the columns for a table with a “
_
” in the name, because
in this case,
mysqlshow
shows you only the table names that match the pattern. This is easily fixed by
adding an extra “
%
” last on the command line as a separate argument.
mysqlshow
supports the following options, which can be specified on the command line or in the
[mysqlshow]
and
[client]
groups of an option file.
mysqlshow
also supports the options for
processing option files described at
Section 4.2.3.4, “Command-Line Options that Affect Option-File
Handling”
.
Table 4.7.
mysqlshow
Options
Format
Option File
Description
Introduced
--
compress [314]
compress [314]
Compress all information sent between the client
and the server
--count [314]
count [314]
Show the number of rows per table
5.0.6
--
debug[=debug_options] [314]
debug [314]
Write a debugging log
--default-
character-
set=charset_name [314]
default-character-
set [314]
Use charset_name as the default character set
--help [314]
Display help message and exit
--
host=host_name [314]
host [314]
Connect to the MySQL server on the given host
--keys [314]
keys [314]
Show table indexes
--
password[=password] [314]
password [314]
The password to use when connecting to the
server
--pipe [315]
On Windows, connect to server using a named
pipe
--
port=port_num [315]
port [315]
The TCP/IP port number to use for the connection
--
protocol=type [315]
protocol [315]
The connection protocol to use
--show-table-
type [315]
Show a column indicating the table type
5.0.4
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...