mysqlshow provides a command-line interface to several SQL SHOW statements

mysqlshow is a command-line tool included with standard MySQL distributions, similar to mysqladmin or other tools. mysqlshow is used to show summary information about databases and tables.


mysqlshow [OPTIONS] [database [table [field]]]

There are four basic modes:

No database given – all databases on the server are shown
Database given only – all tables in that database are shown
Database and table given – all fields in the given table of the database are shown
Database, table, field given – only that field of the table is shown
There is also a search mode, which is activated if the last argument contains an SQL wildcard (*,?,%,_). In this mode, all objects at the level of the last argument are searched. For example,

mysqlshow i88 ca%

matches all tables in i88 starting with the letter ‘ca’.

Numerous options are available:

shows extra information on the table view mode (when you specify only the database name), such as the storage engine, number of rows, creation and modification date.

gives more info in all modes. In database listing mode, it shows the number of tables in each database. In table listing mode, it lists the number of columns. This option can be invoked multiple times for even more info!

--keys, -k
Show table indexes.

Many more (do mysqlshow —help) for a complete list for your version.


Popular posts from this blog

Check MySQL query history from command line