Table of Contents
noinstall
ZIP Archivenoinstall
ZIP存档在Microsoft Windows上安装MySQLThis chapter describes how to obtain and install MySQL. 本章介绍如何获取和安装MySQL。A summary of the procedure follows and later sections provide the details. 以下是程序摘要,后面的章节提供了详细信息。If you plan to upgrade an existing version of MySQL to a newer version rather than install MySQL for the first time, see Section 2.11, “Upgrading MySQL”, for information about upgrade procedures and about issues that you should consider before upgrading.如果您计划将MySQL的现有版本升级为更新版本,而不是第一次安装MySQL,请参阅第2.11节,“升级MySQL”,了解升级过程的信息和升级前应考虑的问题。
If you are interested in migrating to MySQL from another database system, see Section A.8, “MySQL 8.0 FAQ: Migration”, which contains answers to some common questions concerning migration issues.如果您对从另一个数据库系统迁移到MySQL感兴趣,请参阅A.8节,“MySQL 8.0常见问题解答:迁移”,其中包含有关迁移问题的一些常见问题的答案。
Installation of MySQL generally follows the steps outlined here:MySQL的安装通常遵循以下步骤:
Determine whether MySQL runs and is supported on your platform.确定您的平台是否运行并支持MySQL。
Please note that not all platforms are equally suitable for running MySQL, and that not all platforms on which MySQL is known to run are officially supported by Oracle Corporation. 请注意,并非所有平台都同样适合运行MySQL,而且并非所有已知运行MySQL的平台都得到Oracle Corporation的正式支持。For information about those platforms that are officially supported, see https://www.mysql.com/support/supportedplatforms/database.html on the MySQL website.有关官方支持的平台的信息,请参阅MySQL网站上的https://www.mysql.com/support/supportedplatforms/database.html。
Choose which distribution to install.选择要安装的发行版。
Several versions of MySQL are available, and most are available in several distribution formats. MySQL有几个版本,大多数版本都有几种发行格式。You can choose from pre-packaged distributions containing binary (precompiled) programs or source code. 您可以从包含二进制(预编译)程序或源代码的预打包发行版中进行选择。When in doubt, use a binary distribution. 如有疑问,请使用二进制分布。Oracle also provides access to the MySQL source code for those who want to see recent developments and test new code. Oracle还为那些希望查看最新开发和测试新代码的人提供了对MySQL源代码的访问。To determine which version and type of distribution you should use, see Section 2.1.2, “Which MySQL Version and Distribution to Install”.要确定应该使用哪个版本和类型的发行版,请参阅第2.1.2节,“安装哪个MySQL版本和发行版”。
Download the distribution that you want to install.下载要安装的发行版。
For instructions, see Section 2.1.3, “How to Get MySQL”. 有关说明,请参阅第2.1.3节,“如何获取MySQL”。To verify the integrity of the distribution, use the instructions in Section 2.1.4, “Verifying Package Integrity Using MD5 Checksums or GnuPG”.要验证分发的完整性,请使用第2.1.4节,“使用MD5校验和或GnuPG验证包完整性”中的说明。
Install the distribution.安装配线架。
To install MySQL from a binary distribution, use the instructions in Section 2.2, “Installing MySQL on Unix/Linux Using Generic Binaries”. 要从二进制发行版安装MySQL,请使用第2.2节,“使用通用二进制文件在Unix/Linux上安装MySQL”中的说明。Alternatively, use the Secure Deployment Guide, which provides procedures for deploying a generic binary distribution of MySQL Enterprise Edition Server with features for managing the security of your MySQL installation.或者,使用《安全部署指南》,该指南提供了部署MySQL企业版服务器的通用二进制发行版的过程,该发行版具有管理MySQL安装安全性的功能。
To install MySQL from a source distribution or from the current development source tree, use the instructions in Section 2.9, “Installing MySQL from Source”.要从源发行版或当前开发源代码树安装MySQL,请使用第2.9节,“从源代码安装MySQL”中的说明。
Perform any necessary postinstallation setup.执行任何必要的安装后设置。
After installing MySQL, see Section 2.10, “Postinstallation Setup and Testing” for information about making sure the MySQL server is working properly. 安装MySQL后,请参阅第2.10节,“安装后设置和测试”,了解有关确保MySQL服务器正常工作的信息。Also refer to the information provided in Section 2.10.4, “Securing the Initial MySQL Account”. 另请参阅第2.10.4节,“保护初始MySQL帐户”中提供的信息。This section describes how to secure the initial MySQL 本节介绍如何保护初始MySQLroot
user account, which has no password until you assign one. root
用户帐户的安全,该帐户在分配密码之前没有密码。The section applies whether you install MySQL using a binary or source distribution.本节适用于使用二进制或源发行版安装MySQL。
If you want to run the MySQL benchmark scripts, Perl support for MySQL must be available. 如果要运行MySQL基准脚本,必须提供对MySQL的Perl支持。See Section 2.13, “Perl Installation Notes”.请参阅第2.13节,“Perl安装说明”。
Instructions for installing MySQL on different platforms and environments is available on a platform by platform basis:有关在不同平台和环境上安装MySQL的说明可按平台提供:
Unix, Linux, FreeBSD
For instructions on installing MySQL on most Linux and Unix platforms using a generic binary (for example, a 有关使用通用二进制文件(例如.tar.gz包)在大多数Linux和Unix平台上安装MySQL的说明,请参阅第2.2节,“使用通用二进制文件在Unix/Linux上安装MySQL”。.tar.gz
package), see Section 2.2, “Installing MySQL on Unix/Linux Using Generic Binaries”.
For information on building MySQL entirely from the source code distributions or the source code repositories, see Section 2.9, “Installing MySQL from Source”有关完全从源代码发行版或源代码存储库构建MySQL的信息,请参阅第2.9节,“从源代码安装MySQL”。
For specific platform help on installation, configuration, and building from source see the corresponding platform section:有关安装、配置和从源代码生成的特定平台帮助,请参阅相应的平台部分:
Linux, including notes on distribution specific methods, see Section 2.5, “Installing MySQL on Linux”.Linux,包括有关特定于发行版的方法的说明,请参阅第2.5节,“在Linux上安装MySQL”。
IBM AIX, see Section 2.7, “Installing MySQL on Solaris”.IBM AIX,请参阅第2.7节,“在Solaris上安装MySQL”。
FreeBSD, see Section 2.8, “Installing MySQL on FreeBSD”.FreeBSD,请参阅第2.8节,“在FreeBSD上安装MySQL”。
Microsoft Windows
For instructions on installing MySQL on Microsoft Windows, using either the MySQL Installer or Zipped binary, see Section 2.3, “Installing MySQL on Microsoft Windows”.有关使用MySQL安装程序或压缩二进制文件在Microsoft Windows上安装MySQL的说明,请参阅第2.3节,“在Microsoft Windows上安装MySQL”。
For details and instructions on building MySQL from source code using Microsoft Visual Studio, see Section 2.9, “Installing MySQL from Source”.有关使用Microsoft Visual Studio从源代码构建MySQL的详细信息和说明,请参阅第2.9节,“从源代码安装MySQL”。
macOS
For installation on macOS, including using both the binary package and native PKG formats, see Section 2.4, “Installing MySQL on macOS”.有关macOS上的安装,包括使用二进制软件包和本机PKG格式,请参阅第2.4节,“在macOS上安装MySQL”。
For information on making use of an macOS Launch Daemon to automatically start and stop MySQL, see Section 2.4.3, “Installing and Using the MySQL Launch Daemon”.有关使用macOS启动守护程序自动启动和停止MySQL的信息,请参阅第2.4.3节,“安装和使用MySQL启动守护程序”。
For information on the MySQL Preference Pane, see Section 2.4.4, “Installing and Using the MySQL Preference Pane”.有关MySQL首选项窗格的信息,请参阅第2.4.4节,“安装和使用MySQL首选项窗格”。