What is mysqlshow good for?
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.
Here is its basic usage:
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 ucla c% matches all tables in ucla starting with the letter ‘c’.
Numerous options are available:
- -i 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.
- -v 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!
- Many more (do mysqlshow —help) for a complete list for your version.
- mysqlshow may not behave as you want if your database or table name has an underscore in it. See the fix here.
Also see the mysqlshow entry in the MySQL manual.