noinstall
ZIP Archivenoinstall
ZIP存档在Microsoft Windows上安装MySQLMySQL 8.0 Server requires the Microsoft Visual C++ 2015 Redistributable Package to run on Windows platforms. MySQL 8服务器需要微软Visual C++ 2015可重分发包在Windows平台上运行。Users should make sure the package has been installed on the system before installing the server. 在安装服务器之前,用户应确保软件包已安装在系统上。The package is available at the Microsoft Download Center. 该软件包可在Microsoft下载中心获得。Additionally, MySQL debug binaries require Visual Studio 2015 to be installed.此外,MySQL调试二进制文件需要安装Visual Studio 2015。
MySQL is available for Microsoft Windows 64-bit operating systems only. MySQL仅适用于Microsoft Windows 64位操作系统。For supported Windows platform information, see https://www.mysql.com/support/supportedplatforms/database.html.有关支持的Windows平台信息,请参阅https://www.mysql.com/support/supportedplatforms/database.html.
There are different methods to install MySQL on Microsoft Windows.在Microsoft Windows上安装MySQL有不同的方法。
The simplest and recommended method is to download MySQL Installer (for Windows) and let it install and configure a specific version of MySQL Server as follows:最简单且推荐的方法是下载MySQL安装程序(适用于Windows),让它安装并配置特定版本的MySQL服务器,如下所示:
Download MySQL Installer from https://dev.mysql.com/downloads/installer/ and execute it.从下载MySQL安装程序https://dev.mysql.com/downloads/installer/ 并执行它。
Unlike the standard MySQL Installer, the smaller 与标准MySQL安装程序不同,较小的web-community
version does not bundle any MySQL applications, but downloads only the MySQL products you choose to install.web社区版本
不捆绑任何MySQL应用程序,只下载您选择安装的MySQL产品。
Determine the setup type to use for the initial installation of MySQL products. 确定初始安装MySQL产品时使用的安装类型。For example:例如:
Developer Default开发人员默认值: Provides a setup type that includes the selected version of MySQL Server and other MySQL tools related to MySQL development, such as MySQL Workbench.:提供一个安装类型,其中包括选定版本的MySQL服务器和其他与MySQL开发相关的MySQL工具,如MySQL Workbench。
Server Only仅服务器: Provides a setup for the selected version of MySQL Server without other products.:为所选版本的MySQL服务器提供安装程序,无需其他产品。
Custom自定义: Enables you to select any version of MySQL Server and other MySQL products.:允许您选择MySQL服务器和其他MySQL产品的任何版本。
Install the server instance (and products) and then begin the server configuration by following the onscreen instructions. 安装服务器实例(和产品),然后按照屏幕上的说明开始服务器配置。For more information about each individual step, see Section 2.3.3.3.1, “MySQL Server Configuration with MySQL Installer”.有关每个步骤的更多信息,请参阅第2.3.3.3.1节,“使用MySQL安装程序配置MySQL服务器”。
MySQL is now installed. MySQL现在已经安装。If you configured MySQL as a service, then Windows automatically starts the MySQL server every time you restart the system. 如果将MySQL配置为服务,则Windows会在每次重新启动系统时自动启动MySQL服务器。Also, this process installs the MySQL Installer application on the local host, which you can use later to upgrade or reconfigure MySQL server.此外,此过程在本地主机上安装MySQL安装程序应用程序,您可以稍后使用该应用程序升级或重新配置MySQL服务器。
If you installed MySQL Workbench on your system, consider using it to check your new MySQL server connection. 如果在系统上安装MySQL Workbench,请考虑使用它来检查新的MySQL服务器连接。By default, the program automatically start after installing MySQL.默认情况下,程序在安装MySQL后自动启动。
It is possible to run MySQL as a standard application or as a Windows service. 可以将MySQL作为标准应用程序或Windows服务运行。By using a service, you can monitor and control the operation of the server through the standard Windows service management tools. 通过使用服务,您可以通过标准Windows服务管理工具监视和控一致性务器的操作。For more information, see Section 2.3.4.8, “Starting MySQL as a Windows Service”.有关更多信息,请参阅第2.3.4.8节,“将MySQL作为Windows服务启动”。
To accommodate the 为了适应RESTART
statement, the MySQL server forks when run as a service or standalone, to enable a monitor process to supervise the server process. RESTART
语句,MySQL服务器在作为服务或独立运行时进行分叉,以使监视进程能够监视服务器进程。In this case, there are two mysqld processes. 在本例中,有两个mysqld进程。If 如果不需要RESTART
capability is not required, the server can be started with the --no-monitor
option. RESTART
功能,则可以使用--no-monitor
选项启动服务器。See Section 13.7.8.8, “RESTART Statement”.请参阅第13.7.8.8节,“RESTART语句”。
Generally, you should install MySQL on Windows using an account that has administrator rights. 通常,您应该使用具有管理员权限的帐户在Windows上安装MySQL。Otherwise, you may encounter problems with certain operations such as editing the 否则,您可能会在某些操作中遇到问题,例如编辑PATH
environment variable or accessing the Service Control Manager. PATH
环境变量或访问服务控制管理器。When installed, MySQL does not need to be executed using a user with Administrator privileges.安装后,不需要使用具有管理员权限的用户来执行MySQL。
For a list of limitations on the use of MySQL on the Windows platform, see Section 2.3.7, “Windows Platform Restrictions”.有关在Windows平台上使用MySQL的限制列表,请参阅第2.3.7节,“Windows平台限制”。
In addition to the MySQL Server package, you may need or want additional components to use MySQL with your application or development environment. 除了MySQL服务器包之外,您可能还需要或想要其他组件在应用程序或开发环境中使用MySQL。These include, but are not limited to:这些包括但不限于:
To connect to the MySQL server using ODBC, you must have a Connector/ODBC driver. 要使用ODBC连接到MySQL服务器,必须具有连接器/ODBC驱动程序。For more information, including installation and configuration instructions, see MySQL Connector/ODBC Developer Guide.有关更多信息,包括安装和配置说明,请参阅MySQL连接器/ODBC开发人员指南。
MySQL Installer installs and configures Connector/ODBC for you.MySQL安装程序为您安装和配置Connector/ODBC。
To use MySQL server with .NET applications, you must have the Connector/NET driver. 要在.NET应用程序中使用MySQL服务器,必须具有Connector/NET驱动程序。For more information, including installation and configuration instructions, see MySQL Connector/NET Developer Guide.有关更多信息,包括安装和配置说明,请参阅MySQL连接器/NET开发人员指南。
MySQL Installer installs and configures MySQL Connector/NET for you.MySQL安装程序为您安装和配置MySQL Connector/NET。
MySQL distributions for Windows can be downloaded from https://dev.mysql.com/downloads/. 适用于Windows的MySQL发行版可以从https://dev.mysql.com/downloads/下载。See Section 2.1.3, “How to Get MySQL”. 请参阅第2.1.3节,“如何获取MySQL”。
MySQL for Windows is available in several distribution formats, detailed here. MySQL for Windows有几种分发格式,详细信息如下。Generally speaking, you should use MySQL Installer. 一般来说,您应该使用MySQL安装程序。It contains more features and MySQL products than the older MSI, is simpler to use than the compressed file, and you need no additional tools to get MySQL up and running. 它比旧的MSI包含更多的功能和MySQL产品,比压缩文件更易于使用,并且您不需要额外的工具来启动和运行MySQL。MySQL Installer automatically installs MySQL Server and additional MySQL products, creates an options file, starts the server, and enables you to create default user accounts. MySQL安装程序自动安装MySQL服务器和其他MySQL产品,创建选项文件,启动服务器,并允许您创建默认用户帐户。For more information on choosing a package, see Section 2.3.2, “Choosing an Installation Package”.有关选择软件包的更多信息,请参阅第2.3.2节,“选择安装软件包”。
A MySQL Installer distribution includes MySQL Server and additional MySQL products including MySQL Workbench, and MySQL for Visual Studio. MySQL安装程序发行版包括MySQL服务器和其他MySQL产品,包括MySQL Workbench和MySQL for Visual Studio。MySQL Installer can also be used to upgrade these products in the future (see https://dev.mysql.com/doc/mysql-compat-matrix/en/).MySQL安装程序也可用于将来升级这些产品(请参阅https://dev.mysql.com/doc/mysql-compat-matrix/en/)。
For instructions on installing MySQL using MySQL Installer, see Section 2.3.3, “MySQL Installer for Windows”.有关使用MySQL安装程序安装MySQL的说明,请参阅第2.3.3节,“Windows MySQL安装程序”。
The standard binary distribution (packaged as a compressed file) contains all of the necessary files that you unpack into your chosen location. 标准二进制发行版(打包为压缩文件)包含您解包到所选位置的所有必要文件。This package contains all of the files in the full Windows MSI Installer package, but does not include an installation program.此软件包包含完整Windows MSI安装程序包中的所有文件,但不包括安装程序。
For instructions on installing MySQL using the compressed file, see Section 2.3.4, “Installing MySQL on Microsoft Windows Using a 有关使用压缩文件安装MySQL的说明,请参阅第2.3.4节,“使用noinstall ZIP存档在Microsoft Windows上安装MySQL”。noinstall
ZIP Archive”.
The source distribution format contains all the code and support files for building the executables using the Visual Studio compiler system.源代码分发格式包含用于使用VisualStudio编译器系统构建可执行文件的所有代码和支持文件。
For instructions on building MySQL from source on Windows, see Section 2.9, “Installing MySQL from Source”.有关在Windows上从源代码构建MySQL的说明,请参阅第2.9节,“从源代码安装MySQL”。
Large Table Support巨大表支持
If you need tables with a size larger than 4GB, install MySQL on an NTFS or newer file system. 如果需要大于4GB的表,请在NTFS或更新的文件系统上安装MySQL。Do not forget to use 创建表时,不要忘记使用MAX_ROWS
and AVG_ROW_LENGTH
when you create tables. MAX_ROWS
和AVG_ROW_LENGTH
。See Section 13.1.20, “CREATE TABLE Statement”.请参阅第13.1.20节,“CREATE TABLE语句”。
MySQL and Virus Checking SoftwareMySQL与病毒检测软件
Virus-scanning software such as Norton/Symantec Anti-Virus on directories containing MySQL data and temporary tables can cause issues, both in terms of the performance of MySQL and the virus-scanning software misidentifying the contents of the files as containing spam. 包含MySQL数据和临时表的目录上的病毒扫描软件(如Norton/Symantec Anti-Virus)可能会导致MySQL性能和病毒扫描软件错误识别包含垃圾邮件的文件内容方面的问题。This is due to the fingerprinting mechanism used by the virus-scanning software, and the way in which MySQL rapidly updates different files, which may be identified as a potential security risk.这是由于病毒扫描软件使用的指纹机制,以及MySQL快速更新不同文件的方式,这可能被认为是一种潜在的安全风险。
After installing MySQL Server, it is recommended that you disable virus scanning on the main directory (安装MySQL服务器后,建议您在用于存储MySQL表数据的主目录(datadir
) used to store your MySQL table data. datadir
)上禁用病毒扫描。There is usually a system built into the virus-scanning software to enable specific directories to be ignored.病毒扫描软件中通常内置一个系统,以便忽略特定目录。
In addition, by default, MySQL creates temporary files in the standard Windows temporary directory. 此外,默认情况下,MySQL在标准Windows临时目录中创建临时文件。To prevent the temporary files also being scanned, configure a separate temporary directory for MySQL temporary files and add this directory to the virus scanning exclusion list. 要防止临时文件也被扫描,请为MySQL临时文件配置单独的临时目录,并将此目录添加到病毒扫描排除列表中。To do this, add a configuration option for the 为此,请将tmpdir
parameter to your my.ini
configuration file. tmpdir
参数的配置选项添加到my.ini配置文件中。For more information, see Section 2.3.4.2, “Creating an Option File”.有关更多信息,请参阅第2.3.4.2节,“创建选项文件”。