20.4. Using mysqlshow to Obtain MetadataThe mysqlshow client program produces information about the structure of your databases and tables. It provides a command-line interface to various forms of the SHOW statement that list the names of your databases, tables within a database, or information about table columns or indexes. The mysqlshow command has this syntax: mysqlshow [options] [db_name [table_name [column_name]]] The options part of the mysqlshow command may include any of the standard connection parameter options, such as --host or --user. You'll need to supply these options if the default connection parameters aren't appropriate. mysqlshow also understands options specific to its own operation. Invoke mysqlshow with the --help option to see a complete list of its options. The action performed by mysqlshow depends on the number of non-option arguments you provide:
When mysqlshow is used to display table structure, the --keys option may be given to display index structure as well. This information is similar to the output of SHOW INDEX for the table. If the final argument on the command line contains special characters, mysqlshow interprets the argument as a pattern and displays only the names that match the pattern. The special characters are '%' or '*' to match any sequence of characters, and '_' or '?' to match any single character. For example, the following command shows only those databases with a name that begins with 'w': shell> mysqlshow "w%" The pattern characters might be treated as special by your command interpreter. An argument that contains any such characters should be quoted, as shown in the preceding example. Alternatively, use a character that your command interpreter doesn't treat specially. For example, '*' can be used without quoting on Windows and '%' without quoting on Unix. |