mysqlshow
mysqlshow [options] [database[table[column]]]
Use this utility to obtain a list of databases, tables, or
descriptions of tables. It interacts with the server and uses the
SHOW DATABASES, SHOW TABLES, and
SHOW TABLE statements. If no
database name is given for the second argument, all database names will
be listed. If a database name is given along with a table name, the
table named will be described. To limit information to specific columns,
list the columns desired in the fourth argument:
mysqlshow --user=russell -ppassword workrequests work_req
The results of this command will be the same as entering the following SQL statement from the mysql client:
SHOW TABLE workrequests.work_req;
Here is an alphabetical list of options that you can give as part of the first argument of the utility, along with a brief explanation of each.
--character-sets-dir=pathThis option specifies the directory containing character sets.
--compress, -CThis option compresses data passed between the utility and the server, if compression is supported.
--countThis option returns the number of rows for the given table.
--debug[=options],
-# [options]This option logs debugging information. The set of options
used by default is 'd:t:o,logname'. See Table 16-1 at the end of the list the
mysqldump utility options earlier in this
chapter for an explanation of these flags and others that may be
used.
--debug-checkThis option writes debugging information to the log when the utility ends. It’s available as of version 5.1.21 of MySQL.
--debug-infoThis option writes debugging information and CPU and memory usage information to the log after the utility ends.
--default-character-set=setThis option specifies the default character set.
--help, -?This option displays basic help information.
--host=host,
-h hostThis option specifies the name or IP address of the server for connection.
--keys, -kThis option displays table indexes.
--password[=password],
-p[password]This option provides the password to pass to the server. A
space is not permitted after the -p option if
the password is given. If the password is not given, the user will
be prompted for one.
--port=port,
-P portThis option specifies the port number to use for connecting to the server.
--protocol=protocolThis option specifies the protocol to use when connecting to
the server. The choices are TCP,
SOCKET, PIPE, and
MEMORY.
--show-table-type,
-tThis option adds a column to the results to indicate the type of table: a base table or a view.
--socket=filename,
-S filenameThis option provides the name of the server’s socket file.
--sslThis option specifies that secure SSL connections should be
used. It requires the server to have SSL enabled. If this option
is enabled on the utility by default, use --skip-ssl to disable it.
--ssl-ca=pem_fileThis option specifies the name of the file (i.e., the pem file) containing a list of trusted SSL CAs.
--ssl-capath=pathThis option specifies the path to the trusted certificates file (i.e., the pem file).
--ssl-cert=filenameThis option specifies the name of the SSL certificate file to use for SSL connections.
--ssl-cipher=ciphersThis option gives a list of ciphers that may be used for SSL encryption.
--ssl-key=filenameThis option specifies the SSL key file to use for secure connections.
--ssl-verify-server-certThis option verifies the client’s certificate against the server’s certificate for the client at startup. It is available as of version 5.1.11 of MySQL.
--status, -iThis option displays additional information regarding tables.
--user=user,
-u userThis option specifies the username for connecting to the server.
--verbose, -vThis option displays more information.
--version, -VThis option displays the version of the utility.