How can we analyze the tables of a particular database from MySQL Server command line?

MySQLMySQLi Database

We need to use ‘mysqlcheck’ client program along with –analyze option to analyze the tables of a particular database. Its syntax would be as follows −

Mysqlcheck – u root –analyze db_name


The following command will analyze the tables of database ‘query’ −

C:\mysql\bin>mysqlcheck -u root --analyze query                            OK
query.copy_cars                       OK
query.countries                       Table is already up to date
query.customers                       OK
query.date_time_test                  OK
query.detail_bday                     OK
query.eeee                            OK
query.emp                             OK
query.emp123                          OK
query.emp_t                           OK
query.employee12                      OK
query.employee13                      OK
query.examination_btech               OK
query.item_list                       OK
query.item_list1                      OK
query.new_number                      OK
query.reservation                     OK
query.reservations                    OK
query.reserve                         OK
query.student                         OK
query.student_detail                  OK
query.student_info                    OK
query.student_marks                   OK
query.tender                          OK                         OK
Published on 20-Feb-2018 12:41:57