Sometimes I only want to know what is in a server: which databases exist, which tables a schema holds. Starting the full client for that feels like opening a toolbox to find a screw. mysqlshow answers it in one line.
mysqlshow
mysqlshow mydb
mysqlshow mydb mytable
With no arguments it lists the databases. With a database name it lists the tables, and with a table name too it lists the columns and their types. It is a command-line front end for the SHOW statements, so you see only what your account has privileges on. Add the usual -u and -p options for credentials.
Two options make it more useful:
--keys(-k) shows the table indexes.--countshows the number of rows per table.
mysqlshow --count mydb
The docs warn that the count can be slow for tables that are not MyISAM, which means almost every InnoDB table, so I would not run it casually against a big production schema.
The gotcha is wildcards. If the last argument contains *, ?, % or _, it is treated as a pattern. A table called my_table can therefore print matching table names instead of its columns. The documented fix is an extra % as a final argument:
mysqlshow mydb my_table %
On MariaDB the same tool is installed as mariadb-show.
Further reading: MySQL mysqlshow