Team LiB
Previous Section Next Section

mysqlshow

mysqlshow lists databases, tables within a database, or information about columns or indexes within a table. It acts as a command-line interface to the SHOW SQL statement.

Usage

mysqlshow [options] [db_name [tbl_name [col_name]]]

If no database name is specified, mysqlshow lists all databases on the server host. If a database name but no table name is specified, all tables in the database are listed. If database and table names are specified, but no column name is specified, it lists the columns in the table. If all the names are specified, mysqlshow shows information about the given column.

The final argument may contain the '%' and '_' SQL wildcard characters, which are treated the same way as for the LIKE operator. Output is limited to values that match the wildcards. If the final argument contains the '*' or '?' shell wildcard characters, they are treated as '%' and '_', respectively.

Standard Options Supported by mysqlshow

--character-sets-dir      --host                    --shared-memory-base-name
--compress                --password                --socket
--debug                   --pipe                    --user
--default-character-set   --port                    --verbose
--help                    --protocol                --version

mysqlshow also supports the standard SSL options. --default-character-set was introduced in MySQL 4.1.1.

Options Specific to mysqlshow

  • --status, -i (boolean)

    Display the same kind of table information displayed by the SHOW TABLE STATUS statement.

  • --keys, -k (boolean)

    Show information about table indexes in addition to information about table columns. This option is meaningful only if you specify a table name.

    Team LiB
    Previous Section Next Section