The mysqlcheck client performs table maintenance: It checks, repairs, optimizes, or analyzes tables.mysqlcheck客户端执行表维护:它检查、修复、优化或分析表。
Each table is locked and therefore unavailable to other sessions while it is being processed, although for check operations, the table is locked with a 每个表都被锁定,因此在处理过程中无法用于其他会话,尽管对于检查操作,该表仅用READ
lock only (see Section 13.3.6, “LOCK TABLES and UNLOCK TABLES Statements”, for more information about READ
and WRITE
locks). READ
锁锁定(有关READ
和WRITE
锁的更多信息,请参阅第13.3.6节,“LOCK TABLES和UNLOCK TABLES语句”)。Table maintenance operations can be time-consuming, particularly for large tables. 表格维护操作可能很耗时,特别是对于大型表格。If you use the 如果使用--databases
or --all-databases
option to process all tables in one or more databases, an invocation of mysqlcheck might take a long time. --databases
或--all-databases
选项来处理一个或多个数据库中的所有表,则调用mysqlcheck可能需要很长时间。(This is also true for the MySQL upgrade procedure if it determines that table checking is needed because it processes tables the same way.)(MySQL升级过程也是如此,如果它确定需要表检查,因为它以相同的方式处理表。)
mysqlcheck must be used when the mysqld server is running, which means that you do not have to stop the server to perform table maintenance.mysqlcheck必须在mysqld服务器运行时使用,这意味着您不必停止服务器来执行表维护。
mysqlcheck uses the SQL statements mysqlcheck以方便用户的方式使用SQL语句CHECK TABLE
, REPAIR TABLE
, ANALYZE TABLE
, and OPTIMIZE TABLE
in a convenient way for the user. CHECK TABLE
、REPAIR TABLE
、ANALYZE TABLE
和OPTIMIZE TABLE
。It determines which statements to use for the operation you want to perform, and then sends the statements to the server to be executed. 它确定要执行的操作使用哪些语句,然后将语句发送到要执行的服务器。For details about which storage engines each statement works with, see the descriptions for those statements in Section 13.7.3, “Table Maintenance Statements”.有关每个语句使用的存储引擎的详细信息,请参阅第13.7.3节,“表维护语句”中对这些语句的描述。
All storage engines do not necessarily support all four maintenance operations. 并非所有存储引擎都支持所有四种维护操作。In such cases, an error message is displayed. For example, if 在这种情况下,会显示错误消息。例如,如果test.t
is an MEMORY
table, an attempt to check it produces this result:test.t
是一个MEMORY
表,尝试检查它会产生以下结果:
shell> mysqlcheck test t
test.t
note : The storage engine for the table doesn't support check
If mysqlcheck is unable to repair a table, see Section 2.11.13, “Rebuilding or Repairing Tables or Indexes” for manual table repair strategies. 如果mysqlcheck无法修复表,请参阅第2.11.13节,“重建或修复表或索引”,了解手动表修复策略。This is the case, for example, for 例如,InnoDB
tables, which can be checked with CHECK TABLE
, but not repaired with REPAIR TABLE
.InnoDB
表就是这种情况,可以用CHECK TABLE
检查,但不能用REPAIR TABLE
修复。
It is best to make a backup of a table before performing a table repair operation; under some circumstances the operation might cause data loss. Possible causes include but are not limited to file system errors.最好在执行表修复操作之前备份表;在某些情况下,该操作可能会导致数据丢失。可能的原因包括但不限于文件系统错误。
There are three general ways to invoke mysqlcheck:调用mysqlcheck的一般方法有三种:
mysqlcheck [options
]db_name
[tbl_name
...] mysqlcheck [options
] --databasesdb_name
... mysqlcheck [options
] --all-databases
If you do not name any tables following 如果不在db_name
or if you use the --databases
or --all-databases
option, entire databases are checked.db_name
后面命名任何表,或者使用--databases
或--all-databases
选项,则会检查整个数据库。
mysqlcheck has a special feature compared to other client programs. 与其他客户端程序相比,mysqlcheck有一个特殊的功能。The default behavior of checking tables (通过重命名二进制文件,可以更改检查表的默认行为(--check
) can be changed by renaming the binary. --check
)。If you want to have a tool that repairs tables by default, you should just make a copy of mysqlcheck named mysqlrepair, or make a symbolic link to mysqlcheck named mysqlrepair. If you invoke mysqlrepair, it repairs tables.如果你想有一个默认情况下修复表的工具,你应该只复制一个名为mysqlrepair的mysqlcheck,或者创建一个指向mysqlcheck的符号链接,命名为mysqlrepaire。如果你调用mysqlrepair,它会修复表。
The names shown in the following table can be used to change mysqlcheck default behavior.下表中显示的名称可用于更改mysqlcheck的默认行为。
mysqlrepair | --repair --repair |
mysqlanalyze | --analyze --analyze |
mysqloptimize | --optimize --optimize |
mysqlcheck supports the following options, which can be specified on the command line or in the mysqlcheck支持以下选项,可以在命令行或选项文件的[mysqlcheck]
and [client]
groups of an option file. [mysqlcheck]
和[client]
组中指定。For information about option files used by MySQL programs, see Section 4.2.2.2, “Using Option Files”.有关MySQL程序使用的选项文件的信息,请参阅第4.2.2.2节,“使用选项文件”。
Table 4.13 mysqlcheck Options选项
--all-databases | |||
---|---|---|---|
--all-in-1 | |||
--analyze | |||
--auto-repair | |||
--bind-address | |||
--character-sets-dir | |||
--check | |||
--check-only-changed | |||
--check-upgrade | |||
--compress | 8.0.18 | ||
--compression-algorithms | 8.0.18 | ||
--databases | |||
--debug | |||
--debug-check | |||
--debug-info | |||
--default-auth | |||
--default-character-set | |||
--defaults-extra-file | |||
--defaults-file | |||
--defaults-group-suffix | |||
--enable-cleartext-plugin | |||
--extended | |||
--fast | |||
--force | |||
--get-server-public-key | |||
--help | |||
--host | |||
--login-path | |||
--medium-check | |||
--no-defaults | |||
--optimize | |||
--password | |||
--pipe | |||
--plugin-dir | |||
--port | |||
--print-defaults | |||
--protocol | |||
--quick | |||
--repair | |||
--server-public-key-path | |||
--shared-memory-base-name | |||
--silent | |||
--skip-database | |||
--socket | |||
--ssl-ca | |||
--ssl-capath | |||
--ssl-cert | |||
--ssl-cipher | |||
--ssl-crl | |||
--ssl-crlpath | |||
--ssl-fips-mode | |||
--ssl-key | |||
--ssl-mode | |||
--tables | |||
--tls-ciphersuites | 8.0.16 | ||
--tls-version | |||
--use-frm | MyISAM 表的修复操作 | ||
--user | |||
--verbose | |||
--version | |||
--write-binlog | |||
--zstd-compression-level | 8.0.18 |
--help
, -?
Display a help message and exit.显示帮助消息并退出。
--all-databases
, -A
Check all tables in all databases. 检查所有数据库中的所有表。This is the same as using the 这与使用--databases
option and naming all the databases on the command line, except that the INFORMATION_SCHEMA
and performance_schema
databases are not checked. --databases
选项并在命令行上命名所有数据库相同,除了不检查INFORMATION_SCHEMA
和performance_schema
数据库。They can be checked by explicitly naming them with the 可以通过使用--databases
option.--databases
选项显式命名来检查它们。
--all-in-1
, -1
Instead of issuing a statement for each table, execute a single statement for each database that names all the tables from that database to be processed.与其为每个表发出一条语句,不如为每个数据库执行一条语句来命名该数据库中要处理的所有表。
--analyze
, -a
Analyze the tables.分析表格。
If a checked table is corrupted, automatically fix it. Any necessary repairs are done after all tables have been checked.如果已检查的表已损坏,请自动修复。在检查完所有表后,将进行任何必要的修复。
On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server.在具有多个网络接口的计算机上,使用此选项选择用于连接MySQL服务器的接口。
The directory where character sets are installed. 安装字符集的目录。See Section 10.15, “Character Set Configuration”.请参阅第10.15节,“字符集配置”。
--check
, -c
Check the tables for errors. This is the default operation.检查表格是否有错误。这是默认操作。
Check only tables that have changed since the last check or that have not been closed properly.仅检查自上次检查以来发生更改或未正确关闭的表。
--check-upgrade
, -g
Invoke 使用CHECK TABLE
with the FOR UPGRADE
option to check tables for incompatibilities with the current version of the server.FOR UPGRADE
选项调用CHECK TABLE
,检查表是否与当前版本的服务器不兼容。
Compress all information sent between the client and the server if possible. See Section 4.2.8, “Connection Compression Control”.如果可能的话,压缩客户端和服务器之间发送的所有信息。参阅第4.2.8节,“连接压缩控制”。
As of MySQL 8.0.18, this option is deprecated. Expect it to be removed in a future version of MySQL. See Configuring Legacy Connection Compression.从MySQL 8.0.18开始,此选项已被弃用。预计它将在MySQL的未来版本中被删除。请参阅配置传统连接压缩。
--compression-algorithms=
value
The permitted compression algorithms for connections to the server. 允许用于连接到服务器的压缩算法。The available algorithms are the same as for the 可用的算法与protocol_compression_algorithms
system variable. The default value is uncompressed
.protocol_compression_algorithms
系统变量的算法相同。默认值为未压缩。
For more information, see Section 4.2.8, “Connection Compression Control”.有关更多信息,请参阅第4.2.8节,“连接压缩控制”。
This option was added in MySQL 8.0.18.此选项是在MySQL 8.0.18中添加的。
--databases
, -B
Process all tables in the named databases. 处理指定数据库中的所有表。Normally, mysqlcheck treats the first name argument on the command line as a database name and any following names as table names. 通常,mysqlcheck将命令行上的第一个name参数视为数据库名称,将任何后续名称视为表名称。With this option, it treats all name arguments as database names.使用此选项,它将所有名称参数视为数据库名称。
--debug[=
, debug_options
]-# [
debug_options
]
Write a debugging log. 编写调试日志。A typical 典型的debug_options
string is d:t:o,
. The default is file_name
d:t:o
.debug_options
字符串是d:t:o,
。默认值为d:t:o。file_name
This option is available only if MySQL was built using 仅当MySQL使用WITH_DEBUG
. MySQL release binaries provided by Oracle are not built using this option.WITH_DEBUG
构建时,此选项才可用。Oracle提供的MySQL发布二进制文件不是使用此选项构建的。
Print some debugging information when the program exits.程序退出时打印一些调试信息。
This option is available only if MySQL was built using 仅当MySQL使用WITH_DEBUG
. MySQL release binaries provided by Oracle are not built using this option.WITH_DEBUG
构建时,此选项才可用。Oracle提供的MySQL发布二进制文件不是使用此选项构建的。
Print debugging information and memory and CPU usage statistics when the program exits.程序退出时打印调试信息以及内存和CPU使用统计数据。
This option is available only if MySQL was built using 仅当MySQL使用WITH_DEBUG
. MySQL release binaries provided by Oracle are not built using this option.WITH_DEBUG
构建时,此选项才可用。Oracle提供的MySQL发布二进制文件不是使用此选项构建的。
--default-character-set=
charset_name
Use 使用charset_name
as the default character set. See Section 10.15, “Character Set Configuration”.charset_name
作为默认字符集。参阅第10.15节,“字符集配置”。
--defaults-extra-file=
file_name
Read this option file after the global option file but (on Unix) before the user option file. If the file does not exist or is otherwise inaccessible, an error occurs. 在全局选项文件之后读取此选项文件,但(在Unix上)在用户选项文件之前读取。如果文件不存在或无法访问,则会发生错误。If 如果file_name
is not an absolute path name, it is interpreted relative to the current directory.file_name
不是绝对路径名,则会相对于当前目录进行解释。
For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”.有关此选项和其他选项文件选项的更多信息,请参阅第4.2.2.3节,“影响选项文件处理的命令行选项”。
Use only the given option file. If the file does not exist or is otherwise inaccessible, an error occurs. If 仅使用给定的选项文件。如果文件不存在或无法访问,则会发生错误。如果file_name
is not an absolute path name, it is interpreted relative to the current directory.file_name
不是绝对路径名,则会相对于当前目录进行解释。
Exception: Even with 异常:即使使用--defaults-file
, client programs read .mylogin.cnf
.--defaults-file
,客户端程序也会读取.mylogin.cnf
。
For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”.有关此选项和其他选项文件选项的更多信息,请参阅第4.2.2.3节,“影响选项文件处理的命令行选项”。
Read not only the usual option groups, but also groups with the usual names and a suffix of 不仅要读取常用的选项组,还要读取具有常用名称和后缀str
. str
的组。For example, mysqlcheck normally reads the 例如,mysqlcheck通常读取[client]
and [mysqlcheck]
groups. [client]
和[mysqlcheck]
组。If this option is given as 如果将此选项设置为--defaults-group-suffix=_other
, mysqlcheck also reads the [client_other]
and [mysqlcheck_other]
groups.--defaults-group-suffix=_other
,mysqlcheck还会读取[client_other]
和[mysqlcheck_other]
组。
For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”.有关此选项和其他选项文件选项的更多信息,请参阅第4.2.2.3节,“影响选项文件处理的命令行选项”。
--extended
, -e
If you are using this option to check tables, it ensures that they are 100% consistent but takes a long time.如果您使用此选项检查表,则可以确保它们100%一致,但需要很长时间。
If you are using this option to repair tables, it runs an extended repair that may not only take a long time to execute, but may produce a lot of garbage rows also!如果您使用此选项修复表,它将运行一个扩展修复,该修复不仅可能需要很长时间才能执行,还可能产生大量垃圾行!
A hint about which client-side authentication plugin to use. See Section 6.2.17, “Pluggable Authentication”.关于使用哪个客户端身份验证插件的提示。参阅第6.2.17节,“可插拔身份验证”。
Enable the 启用mysql_clear_password
cleartext authentication plugin. mysql_clear_password
明文身份验证插件。(See Section 6.4.1.4, “Client-Side Cleartext Pluggable Authentication”.)(参阅第6.4.1.4节,“客户端明文可插拔身份验证”。)
--fast
, -F
Check only tables that have not been closed properly.仅检查未正确关闭的表。
--force
, -f
Continue even if an SQL error occurs.即使发生SQL错误,也要继续。
Request from the server the public key required for RSA key pair-based password exchange. 从服务器请求基于RSA密钥对的密码交换所需的公钥。This option applies to clients that authenticate with the 此选项适用于使用caching_sha2_password
authentication plugin. caching_sha2_password
身份验证插件进行身份验证的客户端。For that plugin, the server does not send the public key unless requested. This option is ignored for accounts that do not authenticate with that plugin. 对于该插件,除非请求,否则服务器不会发送公钥。对于不使用该插件进行身份验证的帐户,此选项将被忽略。It is also ignored if RSA-based password exchange is not used, as is the case when the client connects to the server using a secure connection.如果不使用基于RSA的密码交换,它也会被忽略,就像客户端使用安全连接连接到服务器的情况一样。
If 如果给定了--server-public-key-path=
is given and specifies a valid public key file, it takes precedence over file_name
--get-server-public-key
.--server-public-key-path=file_name
并指定了一个有效的公钥文件,则它优先于--get-server-public-key
。
For information about the 有关caching_sha2_password
plugin, see Section 6.4.1.2, “Caching SHA-2 Pluggable Authentication”.caching_sha2_password
插件的信息,请参阅第6.4.1.2节,“缓存SHA-2可插拔身份验证”。
--host=
, host_name
-h
host_name
Connect to the MySQL server on the given host.连接到给定主机上的MySQL服务器。
Read options from the named login path in the 从.mylogin.cnf
login path file. .mylogin.cnf
登录路径文件中的指定登录路径读取选项。A “login path” is an option group containing options that specify which MySQL server to connect to and which account to authenticate as. “登录路径”是一个选项组,其中包含指定要连接到哪个MySQL服务器以及要作为哪个帐户进行身份验证的选项。To create or modify a login path file, use the mysql_config_editor utility. 要创建或修改登录路径文件,请使用mysql_config_editor实用程序。See Section 4.6.7, “mysql_config_editor — MySQL Configuration Utility”.请参阅第4.6.7节,“mysql_config编辑器--mysql配置实用程序”。
For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”.有关此选项和其他选项文件选项的更多信息,请参阅第4.2.2.3节,“影响选项文件处理的命令行选项”。
--medium-check
, -m
Do a check that is faster than an 执行比--extended
operation. This finds only 99.99% of all errors, which should be good enough in most cases.--extended
操作更快的检查。这只发现了99.99%的错误,在大多数情况下应该已经足够好了。
Do not read any option files. If program startup fails due to reading unknown options from an option file, 不要读取任何选项文件。如果程序启动因从选项文件中读取未知选项而失败,则使用--no-defaults
can be used to prevent them from being read.--no-defaults
来阻止读取它们。
The exception is that the 例外的是,myloginnf文件在所有情况下都会被读取(如果存在的话)。.mylogin.cnf
file is read in all cases, if it exists. This permits passwords to be specified in a safer way than on the command line even when 这允许以比命令行更安全的方式指定密码,即使使用--no-defaults
is used. --no-defaults
。To create 要创建.mylogin.cnf
, use the mysql_config_editor utility. .mylogin.cnf
,请使用mysql_config_editor实用程序。See Section 4.6.7, “mysql_config_editor — MySQL Configuration Utility”.请参阅第4.6.7节,“mysql_config编辑器--mysql配置实用程序”。
For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”.有关此选项和其他选项文件选项的更多信息,请参阅第4.2.2.3节,“影响选项文件处理的命令行选项”。
--optimize
, -o
Optimize the tables.优化表格。
--password[=
, password
]-p[
password
]
The password of the MySQL account used for connecting to the server. 用于连接到服务器的MySQL帐户的密码。The password value is optional. If not given, mysqlcheck prompts for one. 密码值是可选的。如果没有给出,mysqlcheck会提示输入一个。If given, there must be no space between 如果给定,则--password=
or -p
and the password following it. --password=
或-p
与后面的密码之间不得有空格。If no password option is specified, the default is to send no password.如果未指定密码选项,则默认为不发送密码。
Specifying a password on the command line should be considered insecure. To avoid giving the password on the command line, use an option file. See Section 6.1.2.1, “End-User Guidelines for Password Security”.在命令行上指定密码应被视为不安全。为了避免在命令行上输入密码,请使用选项文件。请参阅第6.1.2.1节,“密码安全最终用户指南”。
To explicitly specify that there is no password and that mysqlcheck should not prompt for one, use the 要明确指定没有密码并且mysqlcheck不应提示输入密码,请使用--skip-password
option.--skip-password
选项。
--pipe
, -W
On Windows, connect to the server using a named pipe. This option applies only if the server was started with the 在Windows上,使用命名管道连接到服务器。仅当服务器启动时启用了named_pipe
system variable enabled to support named-pipe connections. named_pipe
系统变量以支持命名管道连接时,此选项才适用。In addition, the user making the connection must be a member of the Windows group specified by the 此外,进行连接的用户必须是named_pipe_full_access_group
system variable.named_pipe_full_access_group
系统变量指定的Windows组的成员。
The directory in which to look for plugins. 查找插件的目录。Specify this option if the 如果使用--default-auth
option is used to specify an authentication plugin but mysqlcheck does not find it. --default-auth
选项指定身份验证插件,但mysqlcheck找不到它,请指定此选项。See Section 6.2.17, “Pluggable Authentication”.请参阅第6.2.17节,“可插拔身份验证”。
--port=
, port_num
-P
port_num
For TCP/IP connections, the port number to use.对于TCP/IP连接,要使用的端口号。
Print the program name and all options that it gets from option files.打印程序名称及其从选项文件中获取的所有选项。
For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”.有关此选项和其他选项文件选项的更多信息,请参阅第4.2.2.3节,“影响选项文件处理的命令行选项”。
--protocol={TCP|SOCKET|PIPE|MEMORY}
The transport protocol to use for connecting to the server. 用于连接到服务器的传输协议。It is useful when the other connection parameters normally result in use of a protocol other than the one you want. 当其他连接参数通常导致使用与您想要的协议不同的协议时,它很有用。For details on the permissible values, see Section 4.2.7, “Connection Transport Protocols”.有关允许值的详细信息,请参阅第4.2.7节,“连接传输协议”。
--quick
, -q
If you are using this option to check tables, it prevents the check from scanning the rows to check for incorrect links. This is the fastest check method.如果您使用此选项检查表,它将阻止检查扫描行以检查不正确的链接。这是最快的检查方法。
If you are using this option to repair tables, it tries to repair only the index tree. This is the fastest repair method.如果使用此选项修复表,它将尝试仅修复索引树。这是最快的修复方法。
--repair
, -r
Perform a repair that can fix almost anything except unique keys that are not unique.执行修复,几乎可以修复任何东西,除了不是唯一的唯一密钥。
--server-public-key-path=
file_name
The path name to a file in PEM format containing a client-side copy of the public key required by the server for RSA key pair-based password exchange. PEM格式文件的路径名,该文件包含服务器基于RSA密钥对进行密码交换所需的公钥客户端副本。This option applies to clients that authenticate with the 此选项适用于使用sha256_password或sha256_password
or caching_sha2_password
authentication plugin. caching_sha2_password
身份验证插件进行身份验证的客户端。This option is ignored for accounts that do not authenticate with one of those plugins. 对于未使用这些插件之一进行身份验证的帐户,此选项将被忽略。It is also ignored if RSA-based password exchange is not used, as is the case when the client connects to the server using a secure connection.如果不使用基于RSA的密码交换,它也会被忽略,就像客户端使用安全连接连接到服务器的情况一样。
If 如果给定了--server-public-key-path=
is given and specifies a valid public key file, it takes precedence over file_name
--get-server-public-key
.--server-public-key-path=file_name
并指定了一个有效的公钥文件,则它优先于--get-server-public-key
公钥。
For 对于sha256_password
, this option applies only if MySQL was built using OpenSSL.sha256_password
,此选项仅适用于使用OpenSSL构建MySQL的情况。
For information about the 有关bd和sha256_password
and caching_sha2_password
plugins, see Section 6.4.1.3, “SHA-256 Pluggable Authentication”, and Section 6.4.1.2, “Caching SHA-2 Pluggable Authentication”.caching_sha2_password
插件的信息,请参阅第6.4.1.3节,“SHA-256可插拔身份验证”和第6.4.1.2节,“缓存SHA-2可插拔身份认证”。
--shared-memory-base-name=
name
On Windows, the shared-memory name to use for connections made using shared memory to a local server. The default value is 在Windows上,用于使用共享内存连接到本地服务器的共享内存名称。默认值为MYSQL
. The shared-memory name is case-sensitive.MYSQL
。共享内存名称区分大小写。
This option applies only if the server was started with the 此选项仅适用于服务器启动时启用了shared_memory
system variable enabled to support shared-memory connections.shared_memory
系统变量以支持共享内存连接的情况。
--silent
, -s
Silent mode. Print only error messages.静音模式。仅打印错误消息。
Do not include the named database (case-sensitive) in the operations performed by mysqlcheck.在mysqlcheck执行的操作中不要包含指定的数据库(区分大小写)。
--socket=
, path
-S
path
For connections to 对于与localhost
, the Unix socket file to use, or, on Windows, the name of the named pipe to use.localhost
的连接,使用Unix套接字文件,或者在Windows上,使用命名管道的名称。
On Windows, this option applies only if the server was started with the 在Windows上,此选项仅在服务器启动时启用了named_pipe
system variable enabled to support named-pipe connections. named_pipe
系统变量以支持命名管道连接时适用。In addition, the user making the connection must be a member of the Windows group specified by the 此外,进行连接的用户必须是named_pipe_full_access_group
system variable.named_pipe_full_access_group
系统变量指定的Windows组的成员。
Options that begin with 以--ssl
specify whether to connect to the server using encryption and indicate where to find SSL keys and certificates. --ssl
开头的选项指定是否使用加密连接到服务器,并指示在哪里查找SSL密钥和证书。See Command Options for Encrypted Connections.请参见加密连接的命令选项。
--ssl-fips-mode={OFF|ON|STRICT}
Controls whether to enable FIPS mode on the client side. 控制是否在客户端启用FIPS模式。The --ssl-fips-mode选项与其他--ssl-fips-mode
option differs from other --ssl-
options in that it is not used to establish encrypted connections, but rather to affect which cryptographic operations to permit. xxx
--ssl-xxx
选项的不同之处在于,它不用于建立加密连接,而是影响允许的加密操作。See Section 6.8, “FIPS Support”.请参阅第6.8节,“FIPS支持”。
These 允许使用以下--ssl-fips-mode
values are permitted:--ssl-fips-mode
值:
OFF
: Disable FIPS mode.:禁用FIPS模式。
ON
: Enable FIPS mode.:启用FIPS模式。
STRICT
: Enable “strict” FIPS mode.:启用“严格”FIPS模式。
If the OpenSSL FIPS Object Module is not available, the only permitted value for 如果OpenSSL FIPS对象模块不可用,则--ssl-fips-mode
is OFF
. --ssl-fips-mode
的唯一允许值为OFF
。In this case, setting 在这种情况下,将--ssl-fips-mode
to ON
or STRICT
causes the client to produce a warning at startup and to operate in non-FIPS mode.--ssl-fips-mode
设置为ON
或STRICT
会导致客户端在启动时产生警告,并在非fips模式下运行。
Override the 覆盖--databases
or -B
option. All name arguments following the option are regarded as table names.--databases
或-B
选项。选项后面的所有名称参数都被视为表名。
--tls-ciphersuites=
ciphersuite_list
The permissible ciphersuites for encrypted connections that use TLSv1.3. The value is a list of one or more colon-separated ciphersuite names. 允许的密码适用于使用TLSv1.3的加密连接。该值是一个或多个冒号分隔的密码套件名称的列表。The ciphersuites that can be named for this option depend on the SSL library used to compile MySQL. 可以为此选项命名的密码套件取决于用于编译MySQL的SSL库。For details, see Section 6.3.2, “Encrypted Connection TLS Protocols and Ciphers”.有关详细信息,请参阅第6.3.2节,“加密连接TLS协议和密码”。
This option was added in MySQL 8.0.16.此选项是在MySQL 8.0.16中添加的。
The permissible TLS protocols for encrypted connections. 加密连接的允许TLS协议。The value is a list of one or more comma-separated protocol names. 该值是一个或多个逗号分隔的协议名称的列表。The protocols that can be named for this option depend on the SSL library used to compile MySQL. 可以为此选项命名的协议取决于用于编译MySQL的SSL库。For details, see Section 6.3.2, “Encrypted Connection TLS Protocols and Ciphers”.有关详细信息,请参阅第6.3.2节,“加密连接TLS协议和密码”。
For repair operations on 对于MyISAM
tables, get the table structure from the data dictionary so that the table can be repaired even if the .MYI
header is corrupted.MyISAM
表的修复操作,请从数据字典中获取表结构,这样即使.MYI
标头损坏,也可以修复表。
--user=
, user_name
-u
user_name
The user name of the MySQL account to use for connecting to the server.用于连接到服务器的MySQL帐户的用户名。
--verbose
, -v
Verbose mode. Print information about the various stages of program operation.详细模式。打印有关程序操作各个阶段的信息。
--version
, -V
Display version information and exit.显示版本信息并退出。
This option is enabled by default, so that 默认情况下启用此选项,以便将mysqlcheck生成的ANALYZE TABLE
, OPTIMIZE TABLE
, and REPAIR TABLE
statements generated by mysqlcheck are written to the binary log. ANALYZE TABLE
、OPTIMIZE TABLE
和REPAIR TABLE
语句写入二进制日志。Use 使用--skip-write-binlog
to cause NO_WRITE_TO_BINLOG
to be added to the statements so that they are not logged. --skip-write-binlog
将NO_WRITE_TO_BINLOG
添加到语句中,使其不被记录。Use the 当不应将这些语句发送到副本时,请使用--skip-write-binlog
when these statements should not be sent to replicas or run when using the binary logs for recovery from backup.--skip-write-binlog
,或者在使用二进制日志从备份中恢复时运行。
--zstd-compression-level=
level
The compression level to use for connections to the server that use the 用于连接到使用zstd
compression algorithm. zstd
压缩算法的服务器的压缩级别。The permitted levels are from 1 to 22, with larger values indicating increasing levels of compression. 允许的级别为1到22,较大的值表示压缩级别增加。The default 默认的zstd
compression level is 3. zstd
压缩级别为3。The compression level setting has no effect on connections that do not use 压缩级别设置对不使用zstd
compression.zstd
压缩的连接没有影响。
For more information, see Section 4.2.8, “Connection Compression Control”.有关更多信息,请参阅第4.2.8节,“连接压缩控制”。
This option was added in MySQL 8.0.18.此选项是在MySQL 8.0.18中添加的。