MAN page from Other MySQL-client-community-5.0.96-1.sles10.x86_64.rpm
Section: MySQL Database System (1)
mysqlshow - display database, table, and column information
- mysqlshow [options] [db_name [tbl_name [col_name]]]
DESCRIPTIONThemysqlshowclient can be used to quickly see which databases exist, their tables, or a table's columns or indexes.
mysqlshowprovides a command-line interface to several SQLSHOWstatements. SeeSection 12.7.5, lqSHOW Syntaxrq. The same information can be obtained by using those statements directly. For example, you can issue them from themysqlclient program.
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 (lq*rq,lq?rq,lq%rq, orlq_rq), 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.lq*rqandlq?rqcharacters are converted into SQLlq%rqandlq_rqwildcard characters. This might cause some confusion when you try to display the columns for a table with alq_rqin the name, because in this case,mysqlshowshows you only the table names that match the pattern. This is easily fixed by adding an extralq%rqlast on the command line as a separate argument.
mysqlshowsupports the following options, which can be specified on the command line or in the[mysqlshow]and[client]groups of an option file.mysqlshowalso supports the options for processing option files described atSection 18.104.22.168.1, lqCommand-Line Options that Affect Option-File Handlingrq.
Display a help message and exit.
The directory where character sets are installed. SeeSection 9.5, lqCharacter Set Configurationrq.
Compress all information sent between the client and the server if both support compression.
Show the number of rows per table. This can be slow for non-MyISAMtables. This option was added in MySQL 5.0.6.
- *--debug[=debug_options],-# [debug_options]
Write a debugging log. A typicaldebug_optionsstring is'd:t:o,file_name'. The default is'd:t:o'.
Usecharset_nameas the default character set. SeeSection 9.5, lqCharacter Set Configurationrq.
- *--host=host_name,-h host_name
Connect to the MySQL server on the given host.
Show table indexes.
The password to use when connecting to the server. If you use the short option form (-p), youcannothave a space between the option and the password. If you omit thepasswordvalue following the--passwordor-poption on the command line,mysqlshowprompts for one.
Specifying a password on the command line should be considered insecure. SeeSection 22.214.171.124, lqEnd-User Guidelines for Password Securityrq. You can use an option file to avoid giving the password on the command line. You can use an option file to avoid giving the password on the command line.
On Windows, connect to the server using a named pipe. This option applies only if the server supports named-pipe connections.
- *--port=port_num,-P port_num
The TCP/IP port number to use for the connection.
The connection protocol to use for connecting to the server. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want. For details on the permissible values, seeSection 4.2.2, lqConnecting to the MySQL Serverrq.
Show a column indicating the table type, as inSHOW FULL TABLES. The type isBASE TABLEorVIEW. This option was added in MySQL 5.0.4.
- *--socket=path,-S path
For connections tolocalhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use.
Options that begin with--sslspecify whether to connect to the server using SSL and indicate where to find SSL keys and certificates. SeeSection 126.96.36.199, lqSSL Command Optionsrq.
Display extra information about each table.
- *--user=user_name,-u user_name
The MySQL user name to use when connecting to the server.
Verbose mode. Print more information about what the program does. This option can be used multiple times to increase the amount of information.
Display version information and exit.
Copyright © 1997, 2012, Oracle and/or its affiliates. All rights reserved.
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
SEE ALSOFor more information, please refer to the MySQL Reference Manual,which may already be installed locally and which is also availableonline at http://dev.mysql.com/doc/.
AUTHOROracle Corporation (http://dev.mysql.com/).
- SEE ALSO
This document was created byman2html,using the manual pages.