Simple Basic MySql – beginning mysql mysqlshow

[problem]

You want to perform command line display of mysql dbs with mysqlshow.

[/problem]

[solution]

Is this demo, I show the options for mysqlshow.

mysqlshow is a real easy way to quickly view your dbs, tables and rows.

[/solution]

[example]

Show Databases

 $ mysqlshow -i -u'root' -p'xxxxxx' +---------------+ |   Databases   | +---------------+ | demo          | | mysql         | | test          | +---------------+ 

Show number of tables under each db

 $ mysqlshow -v -i -u'root' -p'xxxxx' +---------------+--------+ |   Databases   | Tables | +---------------+--------+ | demo          |      1 | | mysql         |     15 | | test          |      0 | +---------------+--------+ 5 rows in set. 

Show total number of rows for each db

 [marcus@bagend ~]$ mysqlshow -v -v -i -u'root' -p'xxxxx' +---------------+--------+--------------+ |   Databases   | Tables |  Total Rows  | +---------------+--------+--------------+ | demo          |      1 |            7 | | mysql         |     15 |         1383 | | test          |      0 |            0 | +---------------+--------+--------------+ 5 rows in set. 

[/example]

If you have found my website useful, please consider buying me a coffee below 😉

Leave a Reply

Your email address will not be published. Required fields are marked *