As of MySQL 8.0.16, the MySQL server performs the upgrade tasks previously handled by mysql_upgrade (for details, see Section 2.11.3, “What the MySQL Upgrade Process Upgrades”). 从MySQL 8.0.16开始,MySQL服务器执行以前由mysql_upgrade处理的升级任务(有关详细信息,请参阅第2.11.3节,“MySQL升级过程升级的内容”)。Consequently, mysql_upgrade is unneeded and is deprecated as of that version; expect it to be removed in a future version of MySQL. 因此,mysql_upgrade是不必要的,从该版本开始就被弃用了;预计它将在MySQL的未来版本中被删除。Because mysql_upgrade no longer performs upgrade tasks, it exits with status 0 unconditionally.因为mysql_upgrade不再执行升级任务,所以它无条件退出,状态为0。
Each time you upgrade MySQL, you should execute mysql_upgrade, which looks for incompatibilities with the upgraded MySQL server:每次升级MySQL时,都应该执行mysql_upgrade,它会查找与升级后的MySQL服务器的不兼容性:
It upgrades the system tables in the 它升级了mysql
schema so that you can take advantage of new privileges or capabilities that might have been added.mysql
模式中的系统表,以便您可以利用可能添加的新权限或功能。
It upgrades the Performance Schema, 它升级了性能模式、INFORMATION_SCHEMA
, and sys
schema.INFORMATION_SCHEMA
和sys
模式。
It examines user schemas.它检查用户模式。
If mysql_upgrade finds that a table has a possible incompatibility, it performs a table check and, if problems are found, attempts a table repair. 如果mysql_upgrade发现某个表可能不兼容,它将执行表检查,如果发现问题,则尝试修复表。If the table cannot be repaired, see Section 2.11.13, “Rebuilding or Repairing Tables or Indexes” for manual table repair strategies.如果表无法修复,请参阅第2.11.13节,“重建或修复表或索引”,了解手动表修复策略。
mysql_upgrade communicates directly with the MySQL server, sending it the SQL statements required to perform an upgrade.mysql_upgrade直接与mysql服务器通信,向其发送执行升级所需的SQL语句。
You should always back up your current MySQL installation before performing an upgrade. See Section 7.2, “Database Backup Methods”.在执行升级之前,您应该始终备份当前的MySQL安装。请参阅第7.2节,“数据库备份方法”。
Some upgrade incompatibilities may require special handling before upgrading your MySQL installation and running mysql_upgrade. 在升级MySQL安装并运行mysql_upgrade之前,某些升级不兼容可能需要特殊处理。See Section 2.11, “Upgrading MySQL”, for instructions on determining whether any such incompatibilities apply to your installation and how to handle them.请参阅第2.11节,“升级MySQL”,了解有关确定此类不兼容是否适用于您的安装以及如何处理它们的说明。
Use mysql_upgrade like this:像这样使用mysql_upgrade:
Ensure that the server is running.确保服务器正在运行。
Invoke mysql_upgrade to upgrade the system tables in the 调用mysql_upgrade来升级mysql
schema and check and repair tables in other schemas:mysql
模式中的系统表,并检查和修复其他模式中的表:
mysql_upgrade [options
]
Stop the server and restart it so that any system table changes take effect.停止服务器并重新启动,以便任何系统表更改生效。
If you have multiple MySQL server instances to upgrade, invoke mysql_upgrade with connection parameters appropriate for connecting to each of the desired servers. 如果您有多个MySQL服务器实例需要升级,请使用适合连接到每个所需服务器的连接参数调mysql_upgrade。For example, with servers running on the local host on parts 3306 through 3308, upgrade each of them by connecting to the appropriate port:例如,对于在3306至3308部分的本地主机上运行的服务器,通过连接到适当的端口来升级每个服务器:
mysql_upgrade --protocol=tcp -P 3306 [other_options
] mysql_upgrade --protocol=tcp -P 3307 [other_options
] mysql_upgrade --protocol=tcp -P 3308 [other_options
]
For local host connections on Unix, the 对于Unix上的本地主机连接,--protocol=tcp
option forces a connection using TCP/IP rather than the Unix socket file.--protocol=tcp
选项强制使用tcp/IP而不是Unix套接字文件进行连接。
By default, mysql_upgrade runs as the MySQL 默认情况下,root
user. mysql_upgrade
以MySQL root
用户身份运行。If the 如果在运行mysql_upgrade时root
password is expired when you run mysql_upgrade, it displays a message that your password is expired and that mysql_upgrade failed as a result. root
密码已过期,则会显示一条消息,说明您的密码已过期并且mysql_upgade因此失败。To correct this, reset the 要更正此问题,请重置root
password to unexpire it and run mysql_upgrade again. root
密码以取消激活,然后再次运行mysql_upgrade。First, connect to the server as 首先,以root
:root
身份连接到服务器:
shell>mysql -u root -p
Enter password:****
<- enter root password here
Reset the password using 使用ALTER USER
:ALTER USER
重置密码:
mysql> ALTER USER USER() IDENTIFIED BY 'root-password
';
Then exit mysql and run mysql_upgrade again:然后退出mysql并再次运行mysql_upgrade:
shell> mysql_upgrade [options
]
If you run the server with the 如果您在运行服务器时将disabled_storage_engines
system variable set to disable certain storage engines (for example, MyISAM
), mysql_upgrade might fail with an error like this:disabled_storage_engines
系统变量设置为禁用某些存储引擎(例如MyISAM
),mysql_upgrade可能会失败,并出现以下错误:
mysql_upgrade: [ERROR] 3161: Storage engine MyISAM is disabled (Table creation is disallowed).
To handle this, restart the server with 要处理此问题,请在禁用disabled_storage_engines
disabled. disabled_storage_engines
的情况下重新启动服务器。Then you should be able to run mysql_upgrade successfully. 然后,您应该能够成功运行mysql_upgrade。After that, restart the server with 之后,重新启动服务器,并将disabled_storage_engines设置为其原始值。disabled_storage_engines
set to its original value.
Unless invoked with the 除非使用--upgrade-system-tables
option, mysql_upgrade processes all tables in all user schemas as necessary. --upgrade-system-tables
选项调用,否则mysql_upgrade会根据需要处理所有用户模式中的所有表。Table checking might take a long time to complete. Each table is locked and therefore unavailable to other sessions while it is being processed. 表检查可能需要很长时间才能完成。每个表都被锁定,因此在处理过程中对其他会话不可用。Check and repair operations can be time-consuming, particularly for large tables. 检查和维修操作可能很耗时,特别是对于大型表格。Table checking uses the 表检查使用FOR UPGRADE
option of the CHECK TABLE
statement.CHECK TABLE
语句的FOR UPGRADE
选项。 For details about what this option entails, see Section 13.7.3.2, “CHECK TABLE Statement”.有关此选项的详细信息,请参阅第13.7.3.2节,“CHECK TABLE语句”。
mysql_upgrade marks all checked and repaired tables with the current MySQL version number. mysql_upgrade用当前mysql版本号标记所有已检查和修复的表。This ensures that the next time you run mysql_upgrade with the same version of the server, it can be determined whether there is any need to check or repair a given table again.这确保了下次使用相同版本的服务器运行mysql_upgrade时,可以确定是否需要再次检查或修复给定的表。
mysql_upgrade saves the MySQL version number in a file named mysql_upgrade将MySQL版本号保存在数据目录中名为mysql_upgrade_info
in the data directory. mysql_upgrad_info
的文件中。This is used to quickly check whether all tables have been checked for this release so that table-checking can be skipped. 这用于快速检查是否已检查此版本的所有表,以便跳过表检查。To ignore this file and perform the check regardless, use the 要忽略此文件并执行检查,请使用--force
option.--force
选项。
The mysql_upgrade_info
file is deprecated; expect it to be removed in a future version of MySQL.mysql_upgrade_info
文件已弃用;预计它将在MySQL的未来版本中被删除。
mysql_upgrade checks mysql_upgrade检查mysql.user
system table rows and, for any row with an empty plugin
column, sets that column to 'mysql_native_password'
if the credentials use a hash format compatible with that plugin. Rows with a pre-4.1 password hash must be upgraded manually.mysql.user
系统表行,对于任何具有空plugin
列的行,如果凭据使用与该插件兼容的哈希格式,则将该列设置为'mysql_native_password'
。具有4.1之前密码哈希的行必须手动升级。
mysql_upgrade does not upgrade the contents of the time zone tables or help tables. For upgrade instructions, see Section 5.1.15, “MySQL Server Time Zone Support”, and Section 5.1.17, “Server-Side Help Support”.mysql_upgrade不会升级时区表或帮助表的内容。有关升级说明,请参阅第5.1.15节,“MySQL服务器时区支持”和第5.1.17节,“服务器端帮助支持”。
Unless invoked with the 除非使用--skip-sys-schema
option, mysql_upgrade installs the sys
schema if it is not installed, and upgrades it to the current version otherwise. --skip-sys-schema
选项调用,否则mysql_upgrade会安装未安装的sys
模式,否则会将其升级到当前版本。An error occurs if a 如果sys
schema exists but has no version
view, on the assumption that its absence indicates a user-created schema:sys
架构存在但没有version
视图,则会发生错误,前提是它的缺失表示用户创建的架构:
A sys schema exists with no sys.version view. If you have a user created sys schema, this must be renamed for the upgrade to succeed.存在一个没有sysversion视图的sys架构。如果您有用户创建的sys架构,则必须重命名该架构才能成功升级。
To upgrade in this case, remove or rename the existing 在这种情况下,要升级,请先删除或重命名现有的sys
schema first.sys
架构。
mysql_upgrade supports the following options, which can be specified on the command line or in the mysql_upgrade支持以下选项,可以在命令行或选项文件的[mysql_upgrade]
and [client]
groups of an option file. [mysql_upgrade]
和[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.10 mysql_upgrade Options选项
--bind-address | |||
---|---|---|---|
--character-sets-dir | |||
--compress | 8.0.18 | ||
--compression-algorithms | 8.0.18 | ||
--debug | |||
--debug-check | |||
--debug-info | |||
--default-auth | |||
--default-character-set | |||
--defaults-extra-file | |||
--defaults-file | |||
--defaults-group-suffix | |||
--force | |||
--get-server-public-key | |||
--help | |||
--host | |||
--login-path | |||
--max-allowed-packet | |||
--net-buffer-length | |||
--no-defaults | |||
--password | |||
--pipe | |||
--plugin-dir | |||
--port | |||
--print-defaults | |||
--protocol | |||
--server-public-key-path | |||
--shared-memory-base-name | |||
--skip-sys-schema | |||
--socket | |||
--ssl-ca | |||
--ssl-capath | |||
--ssl-cert | |||
--ssl-cipher | |||
--ssl-crl | |||
--ssl-crlpath | |||
--ssl-fips-mode | |||
--ssl-key | |||
--ssl-mode | |||
--tls-ciphersuites | 8.0.16 | ||
--tls-version | |||
--upgrade-system-tables | |||
--user | |||
--verbose | |||
--version-check | |||
--write-binlog | |||
--zstd-compression-level | 8.0.18 |
Display a short help message and exit.显示简短的帮助消息并退出。
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节,“字符集配置”。
--compress
, -C
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. protocol_compression_algorithms
系统变量的算法相同。The default value is 默认值为uncompressed
.uncompressed
。
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中添加的。
--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,/tmp/mysql_upgrade.trace
.debug_options
字符串是d:t:o,file_name
。默认值为d:t:O,/tmp/mysql_upgrade.trace
。
Print some debugging information when the program exits.程序退出时打印一些调试信息。
--debug-info
, -T
Print debugging information and memory and CPU usage statistics when the program exits.程序退出时打印调试信息以及内存和CPU使用统计数据。
A hint about which client-side authentication plugin to use. See Section 6.2.17, “Pluggable Authentication”.关于使用哪个客户端身份验证插件的提示。参阅第6.2.17节,“可插拔身份验证”。
--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. 在全局选项文件之后读取此选项文件,但(在Unix上)在用户选项文件之前读取。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
不是绝对路径名,则会相对于当前目录进行解释。
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
不是绝对路径名,则会相对于当前目录进行解释。
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, mysql_upgrade normally reads the 例如,mysql_upgrade通常读取[client]
and [mysql_upgrade]
groups. If this option is given as --defaults-group-suffix=_other
, mysql_upgrade also reads the [client_other]
and [mysql_upgrade_other]
groups.[client]
和[mysql_upgrade]
组。如果将此选项设置为--defaults-group-suffix=_other
,mysql_upgrade也会读取[client_other]
和[mysql_upgrade_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节,“影响选项文件处理的命令行选项”。
Ignore the 忽略mysql_upgrade_info
file and force execution even if mysql_upgrade has already been executed for the current version of MySQL.mysql_upgrade_info
文件并强制执行,即使当前版本的mysql已经执行了mysql_upgade。
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节,“影响选项文件处理的命令行选项”。
The maximum size of the buffer for client/server communication. The default value is 24MB. The minimum and maximum values are 4KB and 2GB.客户端/服务器通信的最大缓冲区大小。默认值为24MB。最小值和最大值分别为4KB和2GB。
The initial size of the buffer for client/server communication. The default value is 1MB − 1KB. The minimum and maximum values are 4KB and 16MB.客户端/服务器通信缓冲区的初始大小。默认值为1MB 1KB。最小值和最大值分别为4KB和16MB。
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 例外的是,.mylogin.cnf
file is read in all cases, if it exists. .mylogin.cnf
文件在所有情况下都会被读取(如果存在的话)。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节,“影响选项文件处理的命令行选项”。
--password[=
, password
]-p[
password
]
The password of the MySQL account used for connecting to the server. The password value is optional. 用于连接到服务器的MySQL帐户的密码。密码值是可选的。If not given, mysql_upgrade prompts for one. If given, there must be no space between 如果没有给出,mysql_upgrade会提示输入一个。如果给定,则--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 mysql_upgrade should not prompt for one, use the 要明确指定没有密码并且mysql_upgrade不应提示输入密码,请使用--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 mysql_upgrade does not find it. See Section 6.2.17, “Pluggable Authentication”.--default-auth
选项指定身份验证插件,但mysql_upgrade
找不到它,请指定此选项。请参阅第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.打印程序名称及其从选项文件中获取的所有选项。
--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节,“连接传输协议”。
--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
or caching_sha2_password
authentication plugin. sha256_password
或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 有关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”.sha256_password
和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
系统变量以支持共享内存连接的情况。
By default, mysql_upgrade installs the 默认情况下,mysql_upgrade会安装sys架构(如果未安装),否则会将其升级到当前版本。sys
schema if it is not installed, and upgrades it to the current version otherwise. The --skip-sys-schema
option suppresses this behavior.--skip-sys-schema
选项会抑制此行为。
--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. See Command Options for Encrypted Connections.--ssl
开头的选项指定是否使用加密连接到服务器,并指示在哪里查找ssl密钥和证书。请参见加密连接的命令选项。
--ssl-fips-mode={OFF|ON|STRICT}
Controls whether to enable FIPS mode on the client side. The 控制是否在客户端启用FIPS模式。--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-fips-mode
选项与其他--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模式下运行。
--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. 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. 加密连接的允许TLS协议。该值是一个或多个逗号分隔的协议名称的列表。可以为此选项命名的协议取决于用于编译MySQL的SSL库。For details, see Section 6.3.2, “Encrypted Connection TLS Protocols and Ciphers”.有关详细信息,请参阅第6.3.2节,“加密连接TLS协议和密码”。
Upgrade only the system tables in the 只升级mysql
schema, do not upgrade user schemas.mysql
模式中的系统表,不要升级用户模式。
--user=
, user_name
-u
user_name
The user name of the MySQL account to use for connecting to the server. The default user name is 用于连接到服务器的MySQL帐户的用户名。默认用户名为root
.root
。
Verbose mode. Print more information about what the program does.详细模式。打印有关程序功能的更多信息。
--version-check
, -k
Check the version of the server to which mysql_upgrade is connecting to verify that it is the same as the version for which mysql_upgrade was built. 检查mysql_upgrade连接到的服务器的版本,以验证它是否与mysql_upgade构建的版本相同。If not, mysql_upgrade exits. This option is enabled by default; to disable the check, use 如果没有,mysql_upgrade退出。默认情况下启用此选项;要禁用检查,请使用--skip-version-check
.--skip-version-check
。
By default, binary logging by mysql_upgrade is disabled. 默认情况下,禁用mysql_upgrade的二进制日志记录。Invoke the program with 如果您希望将程序的操作写入二进制日志,请使用--write-binlog
if you want its actions to be written to the binary log.--write-binlog
调用程序。
When the server is running with global transaction identifiers (GTIDs) enabled (当服务器在启用全局事务标识符(gtid)(gtid_mode=ON)的情况下运行时,不要通过mysql_upgrade启用二进制日志记录。gtid_mode=ON
), do not enable binary logging by mysql_upgrade.
--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. The compression level setting has no effect on connections that do not use zstd
compression.zstd
压缩级别为3。压缩级别设置对不使用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中添加的。