4.1 Overview of MySQL ProgramsMySQL程序概述

There are many different programs in a MySQL installation. MySQL安装中有许多不同的程序。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. 除NDB群集程序外,后面的章节将对每种程序进行更详细的描述。Each program's description indicates its invocation syntax and the options that it supports. 每个程序的描述都指示其调用语法及其支持的选项。Section 23.4, “NDB Cluster Programs”, describes programs specific to NDB Cluster.第23.4节,“NDB集群计划”描述了特定于NDB集群的计划。

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

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. 每个MySQL程序都有许多不同的选项。大多数程序都提供了--help选项,您可以使用它来获取程序不同选项的描述。For example, try mysql --help.例如,尝试mysql --help

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

The MySQL server, mysqld, is the main program that does most of the work in a MySQL installation. MySQL服务器mysqld是在MySQL安装中完成大部分工作的主程序。The server is accompanied by several related scripts that assist you in starting and stopping the server:服务器附带几个相关脚本,可帮助您启动和停止服务器:

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

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

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

MySQL program-development utilities:MySQL程序——开发实用程序:

Miscellaneous utilities:杂项公用设施:

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 Workbench GUI工具,用于管理MySQL服务器和数据库,创建、执行和评估查询,以及从其他关系数据库管理系统迁移模式和数据以用于MySQL。

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

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

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