O'Reilly logo

MySQL in a Nutshell by Russell J.T. Dyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

mysqlshow

Synopsis

mysqlshow [options] [database [table [column]]]

Use this to obtain a list of databases, tables, or descriptions of tables. This utility interacts with the server and uses the SHOW DATABASES, SHOW TABLES, and SHOWTABLE 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 db1 table1

The results of this command will be the same as entering the following SQL statement from the mysql client:

SHOW TABLE db1.table1;

Here is an alphabetical list of options that you can give as part of the first argument to the utility along with a brief explanation of each:

--character-sets-dir= path

Specifies the directory containing character sets.

--compress, -C

Instructs the utility to compress data passed between it and the server if supported.

--debug[= options ], -# options

Instructs the utility to write debugging information to the log specified along with various settings (e.g., ‘d:t:o,logname').

--default-character-set= set

Specifies the default character set.

--help, -?

Displays basic help information.

--host= host , -h host

Specifies the name or IP address of the server for connection.

--keys, -k

Instructs the utility to display table indexes.

--password[= password ], -p[ password ]

Provides the password to pass to the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required