8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

MySQL 8.4 参考手册 / 6 个 MySQL 程序 / 6.1 MySQL 程序概述
中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 94%

6.1 MySQL 程序概览6.1 Overview of MySQL Programs

在 MySQL 安装中有许多不同的程序。本节提供它们的简要概述。后续章节将对每个程序提供更详细的描述,但 NDB Cluster 程序除外。每个程序的描述都说明了其调用语法及支持的选项。第 25.5 节,“NDB Cluster 程序”描述了 NDB Cluster 特有的程序。There are many different programs in a MySQL installation. This section provides a brief overview of them. Later sections provide a more detailed description of each one, with the exception of NDB Cluster programs. Each program's description indicates its invocation syntax and the options that it supports. Section 25.5, “NDB Cluster Programs”, describes programs specific to NDB Cluster.

大多数 MySQL 发行版包含所有这些程序,除了那些特定于平台的程序。(例如,服务器启动脚本在 Windows 上不使用。)例外的是 RPM 发行版更加专业化。服务器有一个 RPM,客户端程序有另一个,依此类推。如果您发现缺少一个或多个程序,请参见 第 2 章,安装 MySQL,了解发行版类型及其包含内容。可能是您使用的发行版未包含所有程序,您需要安装额外的软件包。Most MySQL distributions include all of these programs, except for those programs that are platform-specific. (For example, the server startup scripts are not used on Windows.) The exception is that RPM distributions are more specialized. There is one RPM for the server, another for client programs, and so forth. If you appear to be missing one or more programs, see Chapter 2, Installing MySQL, for information on types of distributions and what they contain. It may be that you have a distribution that does not include all programs and you need to install an additional package.

每个 MySQL 程序都有许多不同的选项。大多数程序提供一个 --help 选项,你可以使用它来获取程序不同选项的说明。例如,试试 mysql --help。Each MySQL program takes many different options. Most programs provide a --help option that you can use to get a description of the program's different options. For example, try mysql --help.

你可以通过在命令行或选项文件中指定选项来覆盖 MySQL 程序的默认选项值。有关调用程序和指定程序选项的一般信息,请参见 第 6.2 节,“使用 MySQL 程序”。You can override default option values for MySQL programs by specifying options on the command line or in an option file. See Section 6.2, “Using MySQL Programs”, for general information on invoking programs and specifying program options.

MySQL 服务器,mysqld,是 MySQL 安装中执行大部分工作的主要程序。服务器配有一些相关的脚本,帮助您启动和停止服务器:The MySQL server, mysqld, is the main program that does most of the work in a MySQL installation. The server is accompanied by several related scripts that assist you in starting and stopping the server:

在 MySQL 安装或升级期间,有几个程序会执行设置操作:Several programs perform setup operations during MySQL installation or upgrading:

连接到 MySQL 服务器的 MySQL 客户端程序:MySQL client programs that connect to the MySQL server:

MySQL 管理和实用程序:MySQL administrative and utility programs:

MySQL 程序开发工具:MySQL program-development utilities:

杂项工具:Miscellaneous utilities:

Oracle 公司还提供了 MySQL Workbench 图形界面工具,用于管理 MySQL 服务器和数据库,创建、执行和评估查询,以及将其他关系数据库管理系统的模式和数据迁移到 MySQL 使用。Oracle Corporation also provides the MySQL Workbench GUI tool, which is used to administer MySQL servers and databases, to create, execute, and evaluate queries, and to migrate schemas and data from other relational database management systems for use with MySQL.

使用 MySQL 客户端/服务器库与服务器通信的 MySQL 客户端程序使用以下环境变量。MySQL client programs that communicate with the server using the MySQL client/server library use the following environment variables.

环境变量Environment Variable 意义Meaning
MYSQL_UNIX_PORT 默认的 Unix 套接字文件;用于连接到 localhostThe default Unix socket file; used for connections to localhost
MYSQL_TCP_PORT 默认端口号;用于 TCP/IP 连接The default port number; used for TCP/IP connections
MYSQL_DEBUG 调试时的调试跟踪选项Debug trace options when debugging
TMPDIR 创建临时表和文件的目录The directory where temporary tables and files are created

有关 MySQL 程序使用的环境变量的完整列表,请参见 第 6.9 节,“环境变量”。For a full list of environment variables used by MySQL programs, see Section 6.9, “Environment Variables”.