2

I have a large MySQL database which has around 1,500 tables and the file of the database is around 30GB. I would like to suggest me some ways to monitor the health of my database in overall and how i can check the health status of mysql schema table.

How can I monitor the health of my database in overall? I use mysql workbence, but since i am new to this, i don't know what to check!

Leonidas
  • 41
  • 1
  • 1
  • 3

1 Answers1

8

To monitor your database's health in all tables of all databases and automatically repair any corruption:

mysqlcheck --all-databases --auto-repair

Or, you can also optimize all tables (but be aware of performance considerations):

mysqlcheck --all-databases --auto-repair --optimize 

If you want to verify a single table instead, run this command replacing mydb and mytable:

mysql
CHECK TABLE mydb.mytable FAST QUICK;

Read more:

Valerio Bozz
  • 149
  • 6
Rogerlr
  • 461
  • 4
  • 16