This morning I was asked by one of the other Engineers in my group about an easy way to analyze all the tables in a database. So I pointed him to mysqlcheck. Which is a great command line client for performing table mainteneance on mysql database tables. It checks, repairs, optimizes, or analyzes tables, all from the command line. Like any other program it has a ton of flags, but here are three general ways to invoke it.
shell> mysqlcheck [options] db_name [tables]
shell> mysqlcheck [options] –databases db_name1 [db_name2 db_name3…]
shell> mysqlcheck [options] –all-databases
For more information check out.