OS Manuals

/usr/bin/mysqlcheck

Client tools for Percona XtraDB Cluster (FIPS)

From percona-xtradb-cluster-fips-8.4-client 8.4.11.11.1-r2 (enterprise-packages), captured 2026-11-08 by running mysqlcheck --help (exit 0). permalink

/usr/bin/mysqlcheck  Ver 8.4.11-11 for Linux on x86_64 (Source distribution)
Copyright (c) 2009-2026 Percona LLC and/or its affiliates
Copyright (c) 2000, 2026, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

This program can be used to CHECK (-c, -m, -C), REPAIR (-r), ANALYZE (-a),
or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be
used at the same time. Not all options are supported by all storage engines.
Please consult the MySQL manual for latest information about the
above. The options -c, -r, -a, and -o are exclusive to each other, which
means that the last option will be used, if several was specified.

The option -c will be used by default, if none was specified. You
can change the default behavior by making a symbolic link, or
copying this file somewhere with another name, the alternatives are:
mysqlrepair:   The default option will be -r
mysqlanalyze:  The default option will be -a
mysqloptimize: The default option will be -o

Usage: /usr/bin/mysqlcheck [OPTIONS] database [tables]
OR     /usr/bin/mysqlcheck [OPTIONS] --databases DB1 [DB2 DB3...]
OR     /usr/bin/mysqlcheck [OPTIONS] --all-databases

Default options are read from the following files in the given order:
/etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf
The following groups are read: mysqlcheck client
The following options may be given as the first argument:
--print-defaults        Print the program argument list and exit.
--no-defaults           Don't read default options from any option file,
                        except for login file.
--defaults-file=#       Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.
--defaults-group-suffix=#
                        Also read groups with concat(group, suffix)
--login-path=#          Read this path from the login file.
--no-login-paths        Don't read login paths from the login path file.
  -A, --all-databases Check all the databases. This is the same as --databases
                      with all databases selected.
  -a, --analyze       Analyze given tables.
  -1, --all-in-1      Instead of issuing one query for each table, use one
                      query per database, naming all tables in the database in
                      a comma-separated list.
  --auto-repair       If a checked table is corrupted, automatically fix it.
                      Repairing will be done after all tables have been
                      checked, if corrupted ones were found.
  --bind-address=name IP address to bind to.
  --character-sets-dir=name
                      Directory for character set files.
  -c, --check         Check table for errors.
  -C, --check-only-changed
                      Check only tables that have changed since last check or
                      haven't been closed properly.
  -g, --check-upgrade Check tables for version-dependent changes. May be used
                      with --auto-repair to correct tables requiring
                      version-dependent updates.
  --compress          Use compression in server/client protocol.
  -B, --databases     Check several databases. Note the difference in usage; in
                      this case no tables are given. All name arguments are
                      regarded as database names.
  -#, --debug[=#]     This is a non-debug version. Catch this and exit.
  --debug-check       This is a non-debug version. Catch this and exit.
  --debug-info        This is a non-debug version. Catch this and exit.
  --default-character-set=name
                      Set the default character set.
  --default-auth=name Default authentication client-side plugin to use.
  --enable-cleartext-plugin
                      Enable/disable the clear text authentication plugin.
  -F, --fast          Check only tables that haven't been closed properly.
  -f, --force         Continue even if we get an SQL error.
  -e, --extended      If you are using this option with CHECK TABLE, it will
                      ensure that the table is 100 percent consistent, but will
                      take a long time. If you are using this option with
                      REPAIR TABLE, it will force using old slow repair with
                      keycache method, instead of much faster repair by
                      sorting.
  -?, --help          Display this help message and exit.
  -h, --host=name     Connect to host.
  -m, --medium-check  Faster than extended-check, but only finds 99.99 percent
                      of all errors. Should be good enough for most cases.
  --write-binlog      Write ANALYZE, OPTIMIZE and REPAIR TABLE commands to the
                      binary log. Use --skip-write-binlog to omit this.
                      (Defaults to on; use --skip-write-binlog to disable.)
  -o, --optimize      Optimize table.
  -p, --password[=name]
                      Password to use when connecting to server. If password is
                      not given it's asked from the tty.
  -,, --password1[=name]
                      Password for first factor authentication plugin.
  -,, --password2[=name]
                      Password for second factor authentication plugin.
  -,, --password3[=name]
                      Password for third factor authentication plugin.
  --plugin-dir=name   Directory for client-side plugins.
  -P, --port=#        Port number to use for connection or 0 for default to, in
                      order of preference, my.cnf, $MYSQL_TCP_PORT,
                      /etc/services, built-in default (3306).
  --protocol=name     The protocol to use for connection (tcp, socket, pipe,
                      memory).
  -q, --quick         If you are using this option with CHECK TABLE, it
                      prevents the check from scanning the rows to check for
                      wrong links. This is the fastest check. If you are using
                      this option with REPAIR TABLE, it will try to repair only
                      the index tree. This is the fastest repair method for a
                      table.
  -r, --repair        Can fix almost anything except unique keys that aren't
                      unique.
  -s, --silent        Print only error messages.
  --skip-database=name
                      Don't process the database specified as argument
  -S, --socket=name   The socket file to use for connection.
  --server-public-key-path=name
                      File path to the server public RSA key in PEM format.
  --get-server-public-key
                      Get server public key
  --ssl-mode=name     SSL connection mode.
  --ssl-ca=name       CA file in PEM format.
  --ssl-capath=name   CA directory.
  --ssl-cert=name     X509 cert in PEM format.
  --ssl-cipher=name   SSL cipher to use.
  --ssl-key=name      X509 key in PEM format.
  --ssl-crl=name      Certificate revocation list.
  --ssl-crlpath=name  Certificate revocation list path.
  --tls-version=name  TLS version to use, permitted values are: TLSv1.2,
                      TLSv1.3
  --ssl-fips-mode=name
                      SSL FIPS mode (applies only for OpenSSL); permitted
                      values are: OFF, ON, STRICT
  --tls-ciphersuites=name
                      TLS v1.3 cipher to use.
  --ssl-session-data=name
                      Session data file to use to enable ssl session reuse
  --ssl-session-data-continue-on-failed-reuse
                      If set to ON, this option will allow connection to
                      succeed even if session data cannot be reused.
  --tls-sni-servername=name
                      The SNI server name to pass to server
  --tables            Overrides option --databases (-B).
  --use-frm           When used with REPAIR, get table structure from .frm
                      file, so the table can be repaired even if .MYI header is
                      corrupted.
  -u, --user=name     User for login if not current user.
  -v, --verbose       Print info about the various stages.
  -V, --version       Output version information and exit.
  --compression-algorithms=name
                      Use compression algorithm in server/client protocol.
                      Valid values are any combination of
                      'zstd','zlib','uncompressed'.
  --zstd-compression-level=#
                      Use this compression level in the client/server protocol,
                      in case --compression-algorithms=zstd. Valid range is
                      between 1 and 22, inclusive. Default is 3.

Variables (--variable-name=value)
and boolean options {FALSE|TRUE}          Value (after reading options)
----------------------------------------- --------------------------------
all-databases                             FALSE
all-in-1                                  FALSE
auto-repair                               FALSE
bind-address                              (No default value)
character-sets-dir                        (No default value)
compress                                  FALSE
databases                                 FALSE
default-character-set                     (No default value)
default-auth                              (No default value)
enable-cleartext-plugin                   FALSE
fast                                      FALSE
force                                     FALSE
extended                                  FALSE
host                                      (No default value)
write-binlog                              TRUE
plugin-dir                                (No default value)
port                                      0
quick                                     FALSE
silent                                    FALSE
skip-database
socket                                    (No default value)
server-public-key-path                    (No default value)
get-server-public-key                     FALSE
ssl-ca                                    (No default value)
ssl-capath                                (No default value)
ssl-cert                                  (No default value)
ssl-cipher                                (No default value)
ssl-key                                   (No default value)
ssl-crl                                   (No default value)
ssl-crlpath                               (No default value)
tls-version                               (No default value)
tls-ciphersuites                          (No default value)
ssl-session-data                          (No default value)
ssl-session-data-continue-on-failed-reuse FALSE
tls-sni-servername                        (No default value)
use-frm                                   FALSE
user                                      (No default value)
compression-algorithms                    (No default value)
zstd-compression-level                    3
Options (62)
OptionDescriptionSource
--print-defaultsPrint the program argument list and exit.help
--no-defaultsDon't read default options from any option file, except for login file.help
--defaults-file #Only read default options from the given file #.help
--defaults-group-suffix #Also read groups with concat(group, suffix)help
--login-path #Read this path from the login file.help
--no-login-pathsDon't read login paths from the login path file.help
-a, --analyzeAnalyze given tables.help
-1, --all-in-1Instead of issuing one query for each table, use one query per database, naming all tables in the database in a comma-separated list.help
--auto-repairIf a checked table is corrupted, automatically fix it.help
--character-sets-dir nameDirectory for character set files.help
-c, --checkCheck table for errors.help
-C, --check-only-changedCheck only tables that have changed since last check or haven't been closed properly.help
--compressUse compression in server/client protocol.help
-B, --databasesCheck several databases.help
-#, --debug #This is a non-debug version.help
--debug-checkThis is a non-debug version.help
--debug-infoThis is a non-debug version.help
--default-character-set nameSet the default character set.help
--enable-cleartext-pluginEnable/disable the clear text authentication plugin.help
-F, --fastCheck only tables that haven't been closed properly.help
-f, --forceContinue even if we get an SQL error.help
-e, --extendedIf you are using this option with CHECK TABLE, it will ensure that the table is 100 percent consistent, but will take a long time.help
-?, --helpDisplay this help message and exit.help
-h, --host nameConnect to host.help
-m, --medium-checkFaster than extended-check, but only finds 99.99 percent of all errors.help
--write-binlogWrite ANALYZE, OPTIMIZE and REPAIR TABLE commands to the binary log.help
-o, --optimizeOptimize table.help
-p, --password namePassword to use when connecting to server.help
--password1 name•--password2[=pass_val] The password for multifactor authentication factor 2 of the MySQL account used for connecting to the server.help + man
--password2 namePassword for second factor authentication plugin.help
--password3 namePassword for third factor authentication plugin.help
--plugin-dir nameDirectory for client-side plugins.help
-P, --port #Port number to use for connection or 0 for default to, in order of preference, my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default (3306).help
--protocol nameThe protocol to use for connection (tcp, socket, pipe, memory).help
-q, --quickIf you are using this option with CHECK TABLE, it prevents the check from scanning the rows to check for wrong links.help
-r, --repairCan fix almost anything except unique keys that aren't unique.help
-s, --silentPrint only error messages.help
--skip-database nameDon't process the database specified as argumenthelp
-S, --socket nameThe socket file to use for connection.help
--server-public-key-path nameFile path to the server public RSA key in PEM format.help
--get-server-public-keyGet server public keyhelp
--ssl-mode nameSSL connection mode.help
--ssl-ca nameCA file in PEM format.help
--ssl-capath nameCA directory.help
--ssl-cert nameX509 cert in PEM format.help
--ssl-cipher nameSSL cipher to use.help
--ssl-key nameX509 key in PEM format.help
--ssl-crl nameCertificate revocation list.help
--ssl-crlpath nameCertificate revocation list path.help
--tls-version nameTLS version to use, permitted values are: TLSv1.2, TLSv1.3help
--ssl-fips-mode nameSSL FIPS mode (applies only for OpenSSL);help
--tls-ciphersuites nameTLS v1.3 cipher to use.help
--ssl-session-data nameSession data file to use to enable ssl session reusehelp
--ssl-session-data-continue-on-failed-reuseIf set to ON, this option will allow connection to succeed even if session data cannot be reused.help
--tls-sni-servername nameThe SNI server name to pass to serverhelp
--tablesOverrides option --databases (-B).help
--use-frmWhen used with REPAIR, get table structure from .frm file, so the table can be repaired even if .MYI header is corrupted.help
-u, --user nameUser for login if not current user.help
-v, --verbosePrint info about the various stages.help
-V, --versionOutput version information and exit.help
--compression-algorithms nameUse compression algorithm in server/client protocol.help
--zstd-compression-level #Use this compression level in the client/server protocol, in case --compression-algorithms=zstd.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.