mysqladmin is a client for performing administrative operations. You can use it to check the server's configuration and current status, to create and drop databases, and more.mysqladmin是一个用于执行管理操作的客户端。您可以使用它来检查服务器的配置和当前状态,创建和删除数据库等等。
Invoke mysqladmin like this:按如下方式调用mysqladmin:
mysqladmin [options
]command
[command-arg
] [command
[command-arg
]] ...
mysqladmin supports the following commands. Some of the commands take an argument following the command name.mysqladmin支持以下命令。有些命令在命令名后有一个参数。
Create a new database named 创建一个名为db_name
.db_name
的新数据库。
Prior to MySQL 8.0.20, tell the server to write debug information to the error log. The connected user must have the 在MySQL 8.0.20之前,告诉服务器将调试信息写入错误日志。连接的用户必须具有SUPER
privilege. Format and content of this information is subject to change.SUPER
权限。此信息的格式和内容可能会发生变化。
This includes information about the Event Scheduler. See Section 25.4.5, “Event Scheduler Status”.这包括有关事件计划程序的信息。请参阅第25.4.5节,“事件调度程序状态”。
Delete the database named 删除名为db_name
and all its tables.db_name
的数据库及其所有表。
Display the server status variables and their values.显示服务器状态变量及其值。
Flush all information in the host cache. See Section 5.1.12.3, “DNS Lookups and the Host Cache”.清空主机缓存中的所有信息。请参阅第5.1.12.3节,“DNS查找和主机缓存”。
Flush all logs.清空所有日志。
The mysqladmin flush-logs command permits optional log types to be given, to specify which logs to flush. mysqladmin flush-logs
命令允许提供可选的日志类型,以指定要刷新的日志。Following the 按照flush logs命令,您可以提供以下一种或多种日志类型的空格分隔列表:flush-logs
command, you can provide a space-separated list of one or more of the following log types: binary
, engine
, error
, general
, relay
, slow
. binary
、engine
、error
、general
、relay
、slow
。These correspond to the log types that can be specified for the 这些对应于可以为FLUSH LOGS
SQL statement.FLUSH LOGS SQL
语句指定的日志类型。
Reload the grant tables (same as 重新加载授权表(与reload
).reload
相同)。
Clear status variables.清除状态变量。
Flush all tables.冲洗所有表格。
Flush the thread cache.清空线程缓存。
Kill server threads. If multiple thread ID values are given, there must be no spaces in the list.终止服务器线程。如果给定了多个线程ID值,则列表中不得有空格。
To kill threads belonging to other users, the connected user must have the 要终止属于其他用户的线程,连接的用户必须具有CONNECTION_ADMIN
privilege (or the deprecated SUPER
privilege).CONNECTION_ADMIN
权限(或已弃用的SUPER
权限)。
Set a new password. 设置新密码。This changes the password to 这会将您用于mysqladmin连接到服务器的帐户的密码更改为new_password
for the account that you use with mysqladmin for connecting to the server. new_password
。Thus, the next time you invoke mysqladmin (or any other client program) using the same account, you must specify the new password.因此,下次使用同一帐户调用mysqladmin(或任何其他客户端程序)时,必须指定新密码。
Setting a password using mysqladmin should be considered insecure. 使用mysqladmin设置密码应该被认为是不安全的。On some systems, your password becomes visible to system status programs such as ps that may be invoked by other users to display command lines. 在某些系统中,您的密码对系统状态程序(如ps)可见,这些程序可能会被其他用户调用以显示命令行。MySQL clients typically overwrite the command-line password argument with zeros during their initialization sequence. However, there is still a brief interval during which the value is visible. MySQL客户端在初始化过程中通常会用零覆盖命令行密码参数。但是,仍然有一个短暂的间隔,在此期间该值是可见的。Also, on some systems this overwriting strategy is ineffective and the password remains visible to ps. (SystemV Unix systems and perhaps others are subject to this problem.)此外,在某些系统上,这种覆盖策略无效,密码对ps仍然可见。(SystemV Unix系统和其他系统可能都会遇到这个问题。)
If the 如果new_password
value contains spaces or other characters that are special to your command interpreter, you need to enclose it within quotation marks. new_password
值包含空格或命令解释器特有的其他字符,则需要将其括在引号内。On Windows, be sure to use double quotation marks rather than single quotation marks; single quotation marks are not stripped from the password, but rather are interpreted as part of the password. For example:在Windows上,请务必使用双引号而不是单引号;单引号不会从密码中删除,而是被解释为密码的一部分。例如:
mysqladmin password "my new password"
The new password can be omitted following the 可以在执行password
command. password
命令后省略新密码。In this case, mysqladmin prompts for the password value, which enables you to avoid specifying the password on the command line. 在这种情况下,mysqladmin会提示输入密码值,这使您可以避免在命令行上指定密码。Omitting the password value should be done only if 只有当password
is the final command on the mysqladmin command line. password
是mysqladmin命令行上的最后一个命令时,才应省略密码值。Otherwise, the next argument is taken as the password.否则,下一个参数将被视为密码。
Do not use this command used if the server was started with the 如果服务器是使用--skip-grant-tables
option. --skip-grant-tables
选项启动的,则不要使用此命令。No password change is applied. This is true even if you precede the 不应用密码更改。即使您在同一命令行上以password
command with flush-privileges
on the same command line to re-enable the grant tables because the flush operation occurs after you connect. flush-privileges
在password
命令之前重新启用授权表,这也是正确的,因为刷新操作是在您连接后发生的。However, you can use mysqladmin flush-privileges to re-enable the grant table and then use a separate mysqladmin password command to change the password.但是,您可以使用mysqladmin flush-privileges
重新启用授权表,然后使用单独的mysqladmin password
命令更改密码。
Check whether the server is available. The return status from mysqladmin is 0 if the server is running, 1 if it is not. 检查服务器是否可用。如果服务器正在运行,mysqladmin的返回状态为0,如果没有运行,返回状态为1。This is 0 even in case of an error such as 即使在出现“拒绝访问”等错误的情况下,这也是0,因为这意味着服务器正在运行但拒绝了连接,这与服务器未运行的情况不同。Access denied
, because this means that the server is running but refused the connection, which is different from the server not running.
Show a list of active server threads. This is like the output of the 显示活动服务器线程的列表。这类似于SHOW PROCESSLIST
statement. SHOW PROCESSIST
语句的输出。If the 如果给出--verbose
option is given, the output is like that of SHOW FULL PROCESSLIST
. --verbose
选项,则输出类似于SHOW FULL PROCESSIST
。(See Section 13.7.7.29, “SHOW PROCESSLIST Statement”.)(参阅第13.7.7.29节,“SHOW PROCESSLIST语句”。)
Reload the grant tables.重新加载授权表。
Flush all tables and close and open log files.刷新所有表并关闭和打开日志文件。
Stop the server.停止服务器。
Start replication on a replica server.在副本服务器上启动复制。
Display a short server status message.显示简短的服务器状态消息。
Stop replication on a replica server.停止副本服务器上的复制。
Display the server system variables and their values.显示服务器系统变量及其值。
Display version information from the server.显示服务器的版本信息。
All commands can be shortened to any unique prefix. For example:所有命令都可以缩短为任何唯一的前缀。例如:
shell> mysqladmin proc stat
+----+-------+-----------+----+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------+-----------+----+---------+------+-------+------------------+
| 51 | jones | localhost | | Query | 0 | | show processlist |
+----+-------+-----------+----+---------+------+-------+------------------+
Uptime: 1473624 Threads: 1 Questions: 39487
Slow queries: 0 Opens: 541 Flush tables: 1
Open tables: 19 Queries per second avg: 0.0268
The mysqladmin status command result displays the following values:mysqladmin status
命令结果显示以下值:
The number of seconds the MySQL server has been running.MySQL服务器运行的秒数。
Threads
The number of active threads (clients).活动线程(客户端)的数量。
The number of questions (queries) from clients since the server was started.自服务器启动以来来自客户端的问题(查询)数。
Slow queries
The number of queries that have taken more than 耗时超过long_query_time
seconds. See Section 5.4.5, “The Slow Query Log”.long_query_time
秒的查询数。请参阅第5.4.5节,“慢速查询日志”。
Opens
The number of tables the server has opened.服务器已打开的表数。
Flush tables
The number of 服务器已执行的flush-*
, refresh
, and reload
commands the server has executed.flush-*
、refresh
和reload
命令的数量。
Open tables
The number of tables that currently are open.当前打开的表数。
If you execute mysqladmin shutdown when connecting to a local server using a Unix socket file, mysqladmin waits until the server's process ID file has been removed, to ensure that the server has stopped properly.如果在使用Unix套接字文件连接到本地服务器时执行mysqladmin shutdown,mysqladmin会等待直到服务器的进程ID文件被删除,以确保服务器已正确停止。
mysqladmin supports the following options, which can be specified on the command line or in the mysqladmin支持以下选项,可以在命令行或选项文件的[mysqladmin]
and [client]
groups of an option file. [mysqladmin]
和[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.12 mysqladmin Options选项
--bind-address | |||
---|---|---|---|
--compress | 8.0.18 | ||
--compression-algorithms | 8.0.18 | ||
--connect-timeout | |||
--count | |||
--debug | |||
--debug-check | |||
--debug-info | |||
--default-auth | |||
--default-character-set | |||
--defaults-extra-file | |||
--defaults-file | |||
--defaults-group-suffix | |||
--enable-cleartext-plugin | |||
--force | |||
--get-server-public-key | |||
--help | |||
--host | |||
--login-path | |||
--no-beep | |||
--no-defaults | |||
--password | |||
--pipe | |||
--plugin-dir | |||
--port | |||
--print-defaults | |||
--protocol | |||
--relative | |||
--server-public-key-path | |||
--shared-memory-base-name | |||
--show-warnings | |||
--shutdown-timeout | |||
--silent | |||
--sleep | |||
--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 | |||
--user | |||
--verbose | |||
--version | |||
--vertical | |||
--wait | |||
--zstd-compression-level | 8.0.18 |
--help
, -?
Display a 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中添加的。
The maximum number of seconds before connection timeout. The default value is 43200 (12 hours).连接超时前的最大秒数。默认值为43200(12小时)。
--count=
, N
-c
N
The number of iterations to make for repeated command execution if the 如果给定--sleep
option is given.--sleep
选项,则重复执行命令的迭代次数。
--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/mysqladmin.trace
.debug_options
字符串是d:t:o,file_name
。默认值为d:t:o,/tmp/mysqladmin.trace
。
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发布二进制文件不是使用此选项构建的。
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. 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, mysqladmin normally reads the 例如,mysqladmin通常读取[client]
and [mysqladmin]
groups. [client]
和[mysqladmin]
组。If this option is given as 如果将此选项设置为--defaults-group-suffix=_other
, mysqladmin also reads the [client_other]
and [mysqladmin_other]
groups.--defaults-group-suffix=_other
,mysqladmin还会读取[client_other]
和[mysqladmin_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节,“影响选项文件处理的命令行选项”。
Enable the 启用mysql_clear_password
cleartext authentication plugin. (See Section 6.4.1.4, “Client-Side Cleartext Pluggable Authentication”.)mysql_clear_password
明文身份验证插件。(参阅第6.4.1.4节,“客户端明文可插拔身份验证”。)
--force
, -f
Do not ask for confirmation for the 不要要求确认drop
command. With multiple commands, continue even if an error occurs.db_name
drop db_name
命令。对于多个命令,即使发生错误也要继续。
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. See Section 4.6.7, “mysql_config_editor — MySQL Configuration Utility”.要创建或修改登录路径文件,请使用mysql_config_editor实用程序。请参阅第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节,“影响选项文件处理的命令行选项”。
--no-beep
, -b
Suppress the warning beep that is emitted by default for errors such as a failure to connect to the server.抑制默认情况下因连接到服务器失败等错误而发出的警告蜂鸣声。
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, mysqladmin prompts for one. 如果没有给出,mysqladmin会提示输入一个。If given, there must be no space between 如果给定,则--password=
or -p
and the password following it. If no password option is specified, the default is to send no password.--password=
或-p
与其后面的密码之间不得有空格。如果未指定密码选项,则默认情况下不发送密码。
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 mysqladmin should not prompt for one, use the 要明确指定没有密码并且mysqladmin不应提示输入密码,请使用--skip-password
option.--skip-password
选项。
--pipe
, -W
On Windows, connect to the server using a named pipe. 在Windows上,使用命名管道连接到服务器。This option applies only if the server was started with the 仅当服务器启动时启用了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 mysqladmin does not find it. --default-auth
选项指定身份验证插件,但mysqladmin找不到它,请指定此选项。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节,“连接传输协议”。
--relative
, -r
Show the difference between the current and previous values when used with the 显示与--sleep
option. --sleep
选项一起使用时当前值和以前值之间的差异。This option works only with the 此选项仅适用于extended-status
command.extended-status
命令。
--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或caching_sha2_password身份验证插件进行身份验证的客户端。sha256_password
or caching_sha2_password
authentication plugin. 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
系统变量以支持共享内存连接的情况。
Show warnings resulting from execution of statements sent to the server.显示因执行发送到服务器的语句而产生的警告。
The maximum number of seconds to wait for server shutdown. The default value is 3600 (1 hour).等待服务器关闭的最大秒数。默认值为3600(1小时)。
--silent
, -s
Exit silently if a connection to the server cannot be established.如果无法建立与服务器的连接,请静默退出。
--sleep=
, delay
-i
delay
Execute commands repeatedly, sleeping for 重复执行命令,在两者之间休眠delay
seconds in between. delay
秒钟。The --count
option determines the number of iterations. --count
选项决定迭代次数。If 如果未给出--count
is not given, mysqladmin executes commands indefinitely until interrupted.--count
,mysqladmin将无限期执行命令,直到中断。
--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开头的选项指定是否使用加密连接到服务器,并指示在哪里查找ssl密钥和证书。请参见加密连接的命令选项。--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-fips-mode={OFF|ON|STRICT}
Controls whether to enable FIPS mode on the client side. 控制是否在客户端启用FIPS模式。The --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. 加密连接的允许TLS协议。该值是一个或多个逗号分隔的协议名称的列表。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协议和密码”。
--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 more information about what the program does.详细模式。打印有关程序功能的更多信息。
--version
, -V
Display version information and exit.显示版本信息并退出。
--vertical
, -E
Print output vertically. This is similar to 垂直打印输出。这类似于--relative
, but prints output vertically.--relative
,但垂直打印输出。
--wait[=
, count
]-w[
count
]
If the connection cannot be established, wait and retry instead of aborting. 如果无法建立连接,请等待并重试,而不是中止。If a 如果给出count
value is given, it indicates the number of times to retry. The default is one time.count
值,则表示重试的次数。默认值为一次。
--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中添加的。