/usr/bin/mariadb-check from 12.1.2-MariaDB, client 2.8 for Linux (x86_64)
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
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.
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 (--check) 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/mariadb-check [OPTIONS] database [tables]
OR /usr/bin/mariadb-check [OPTIONS] --databases DB1 [DB2 DB3...]
Please consult the MariaDB Knowledge Base at
https://mariadb.com/kb/en/mysqlcheck for latest information about
this program.
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
The following groups are read: mysqlcheck mariadb-check client client-server client-mariadb
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.
The following specify which files/extra groups are read (specified before remaining options):
--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=# Additionally read default groups with # appended as a suffix.
-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.
--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 Check memory and open file usage at exit.
--debug-info Print some debug info at exit.
--default-character-set=name
Set the default character set.
--default-auth=name Default authentication client-side plugin to use.
-F, --fast Check only tables that haven't been closed properly.
--fix-db-names Fix database names.
--fix-table-names Fix table names.
-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.
--flush Flush each table after check. This is useful if you don't
want to have the checked tables take up space in the
caches after the check
-?, --help Display this help message and exit.
-h, --host=name Connect to host. Defaults in the following order:
$MARIADB_HOST, and then localhost
-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 Log ANALYZE, OPTIMIZE and REPAIR TABLE commands. Use
--skip-write-binlog when commands should not be sent to
replication slaves.
(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 solicited on the tty.
-Z, --persistent When using ANALYZE TABLE use the PERSISTENT FOR ALL
option.
--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).
-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.
--ssl Enable SSL for connection (automatically enabled with
other flags).
(Defaults to on; use --skip-ssl to disable.)
--ssl-ca=name CA file in PEM format (check OpenSSL docs, implies
--ssl).
--ssl-capath=name CA directory (check OpenSSL docs, implies --ssl).
--ssl-cert=name X509 cert in PEM format (implies --ssl).
--ssl-cipher=name SSL cipher to use (implies --ssl).
--ssl-key=name X509 key in PEM format (implies --ssl).
--ssl-crl=name Certificate revocation list (implies --ssl).
--ssl-crlpath=name Certificate revocation list path (implies --ssl).
--tls-version=name TLS protocol version for secure connection.
--ssl-fp=name Server certificate fingerprint (implies --ssl).
--ssl-fplist=name File with accepted server certificate fingerprints, one
per line (implies --ssl).
--ssl-verify-server-cert
Verify server's certificate to prevent man-in-the-middle
attacks
(Defaults to on; use --skip-ssl-verify-server-cert to disable.)
--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; Using it 3 times
will print out all CHECK, RENAME and ALTER TABLE during
the check phase.
-V, --version Output version information and exit.
--process-views[=name]
Perform the requested operation (check or repair) on
views. One of: NO, YES (correct the checksum, if
necessary, add the mariadb-version field), UPGRADE (run
from mariadb-upgrade), UPGRADE_FROM_MYSQL (same as YES
and toggle the algorithm MERGE<->TEMPTABLE.
--process-tables Perform the requested operation on tables.
(Defaults to on; use --skip-process-tables to disable.)
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- ----------------------------------------
all-databases FALSE
all-in-1 FALSE
auto-repair FALSE
character-sets-dir (No default value)
compress FALSE
databases FALSE
debug-check FALSE
debug-info FALSE
default-character-set (No default value)
default-auth (No default value)
fast FALSE
fix-db-names FALSE
fix-table-names FALSE
force FALSE
extended FALSE
flush FALSE
host (No default value)
write-binlog TRUE
persistent FALSE
plugin-dir (No default value)
port 0
quick FALSE
silent FALSE
skip-database (No default value)
socket (No default value)
ssl TRUE
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)
ssl-fp (No default value)
ssl-fplist (No default value)
ssl-verify-server-cert TRUE
use-frm FALSE
user (No default value)
process-views NO
process-tables TRUE
Options (56)
| Option | Description | Source |
|---|
--print-defaults | Print the program argument list and exit. | help |
--no-defaults | Don't read default options from any option file. | help |
--defaults-file # | Only read default options from the given file #. | help |
--defaults-extra-file # | Read this file after the global files are read. | help |
-a, --analyze | Analyze given tables. | help |
-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. | help |
--auto-repair | If a checked table is corrupted, automatically fix it. | help |
--character-sets-dir name | Directory for character set files. | help |
-c, --check | Check table for errors. | help |
-C, --check-only-changed | Check only tables that have changed since last check or haven't been closed properly. | help |
--compress | Use compression in server/client protocol. | help |
-B, --databases | Check several databases. | help |
-#, --debug # | This is a non-debug version. | help |
--debug-check | Check memory and open file usage at exit. | help |
--debug-info | Print some debug info at exit. | help |
--default-character-set name | Set the default character set. | help |
-F, --fast | Check only tables that haven't been closed properly. | help |
--fix-db-names | Fix database names. | help |
--fix-table-names | Fix table names. | help |
-f, --force | Continue even if we get an SQL error. | help |
-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. | help |
--flush | Flush each table after check. | help |
-?, --help | Display this help message and exit. | help |
-h, --host name | Connect to host. | help |
-m, --medium-check | Faster than extended-check, but only finds 99.99 percent of all errors. | help |
--write-binlog | Log ANALYZE, OPTIMIZE and REPAIR TABLE commands. | help |
-o, --optimize | Optimize table. | help |
-p, --password name | Password to use when connecting to server. | help |
-Z, --persistent | When using ANALYZE TABLE use the PERSISTENT FOR ALL option. | help |
--plugin-dir name | Directory 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 name | The protocol to use for connection (tcp, socket, pipe). | help |
-q, --quick | If you are using this option with CHECK TABLE, it prevents the check from scanning the rows to check for wrong links. | help |
-r, --repair | Can fix almost anything except unique keys that aren't unique. | help |
-s, --silent | Print only error messages. | help |
--skip-database name | Don't process the database specified as argument | help |
-S, --socket name | The socket file to use for connection. | help |
--ssl | Enable SSL for connection (automatically enabled with other flags). | help |
--ssl-ca name | CA file in PEM format (check OpenSSL docs, implies | help |
--ssl-capath name | CA directory (check OpenSSL docs, implies --ssl). | help |
--ssl-cert name | X509 cert in PEM format (implies --ssl). | help |
--ssl-cipher name | SSL cipher to use (implies --ssl). | help |
--ssl-key name | X509 key in PEM format (implies --ssl). | help |
--ssl-crl name | Certificate revocation list (implies --ssl). | help |
--ssl-crlpath name | Certificate revocation list path (implies --ssl). | help |
--tls-version name | TLS protocol version for secure connection. | help |
--ssl-fp name | Server certificate fingerprint (implies --ssl). | help |
--ssl-fplist name | File with accepted server certificate fingerprints, one per line (implies --ssl). | help |
--ssl-verify-server-cert | Verify server's certificate to prevent man-in-the-middle attacks (Defaults to on; | help |
--tables | Overrides option --databases (-B). | help |
--use-frm | When used with REPAIR, get table structure from .frm file, so the table can be repaired even if .MYI header is corrupted. | help |
-u, --user name | User for login if not current user. | help |
-v, --verbose | Print info about the various stages; | help |
-V, --version | Output version information and exit. | help |
--process-views name | Perform the requested operation (check or repair) on views. | help |
--process-tables | Perform the requested operation on tables. | 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.