Name
mysqlcheck
Synopsis
mysqlcheck [options]database[table]
Use this to check and to repair MyISAM
tables, as well as to optimize them. This utility is similar in use
and purpose to myisamchk. Instead of working with
the table files directly like myisamchk, though,
this utility interacts with the MySQL server instead. It uses the
ANALYZE TABLE, the CHECK TABLE,
and REPAIRTABLE statements.
The name of the database containing the tables to check is given as the second argument to the utility. The table to check is given as the third argument. Additional tables may be given in a space-separated list. Here is a list of options that you can give and a brief explanation of each:
-
--all-databases, -A Instructs the utility to check all databases.
-
--all-in-1, -1 Instructs the utility to execute all queries for all tables in each database in one statement rather than in separate queries for each table.
-
--analyze, -a Has the utility analyze tables.
-
--auto-repair Instructs the utility to automatically repair any corrupted tables found.
-
--character-sets-dir=path Specifies the directory containing character sets.
-
--check, -c Instructs the utility to check tables for errors.
-
--check-only-changed, -C Has the utility check only tables that have changed since the last check, as well as tables that were not closed properly.
-
--compress Instructs the utility to compress data passed between it and the server if supported.
-
--databasesdatabases, -Bdatabases Specifies more than one database for checking. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access