8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

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

打开官方英文原文 ↗

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

MySQL 8.4 参考手册 / 3 升级 MySQL / 3.11 在 Windows 上升级 MySQL
中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 100%

3.11 在 Windows 上升级 MySQL3.11 Upgrading MySQL on Windows

要在 Windows 上升级 MySQL,可以下载并执行最新的 MySQL Server MSI,或者使用 Windows ZIP 压缩包分发版。To upgrade MySQL on Windows, either download and execute the latest MySQL Server MSI or use the Windows ZIP archive distribution.

Note

与 MySQL 8.4 不同,MySQL 8.0 使用 MySQL 安装程序来安装和升级 MySQL Server 及大多数其他 MySQL 产品;但 MySQL 安装程序在 MySQL 8.1 及更高版本中不可用。然而,MySQL 安装程序中使用的配置功能自 MySQL 8.1 起可通过 第 2.3.2 节,“配置:使用 MySQL Configurator” 获得,该功能包含在 MSI 和 ZIP 压缩包中。Unlike MySQL 8.4, MySQL 8.0 uses MySQL Installer to install and upgrade MySQL Server along with most other MySQL products; but MySQL Installer is not available with MySQL 8.1 and higher. However, the configuration functionality used in MySQL Installer is available as of MySQL 8.1 using Section 2.3.2, “Configuration: Using MySQL Configurator” that is bundled with both the MSI and Zip archive.

您选择的方法取决于现有安装是如何进行的。在继续之前,请查看第 3 章,升级 MySQL,了解与 Windows 无关的 MySQL 升级的更多信息。The approach you select depends on how the existing installation was performed. Before proceeding, review Chapter 3, Upgrading MySQL for additional information on upgrading MySQL that is not specific to Windows.

使用 MSI 升级 MySQLUpgrading MySQL with MSI

下载并执行最新的 MSI。虽然不直接支持在不同发布系列之间升级,但“自定义安装”选项允许定义安装位置,否则 MSI 会安装到标准位置,例如 C:\Program Files\MySQL\MySQL Server 8.4\。Download and execute the latest MSI. Although upgrading between release series is not directly supported, the "Custom Setup" option allows defining an installation location as otherwise the MSI installs to the standard location, such as C:\Program Files\MySQL\MySQL Server 8.4\.

执行 MySQL Configurator 来配置您的安装。Execute MySQL Configurator to configure your installation.

使用 Windows ZIP 发行版升级 MySQLUpgrading MySQL Using the Windows ZIP Distribution

要使用 Windows ZIP 存档分发版本进行升级:To perform an upgrade using the Windows ZIP archive distribution:

  1. 从 https://dev.mysql.com/downloads/ 下载 MySQL 最新的 Windows ZIP 压缩包发行版。Download the latest Windows ZIP Archive distribution of MySQL from https://dev.mysql.com/downloads/.

  2. 如果服务器正在运行,请将其停止。如果服务器安装为服务,请在命令提示符下使用以下命令停止该服务:If the server is running, stop it. If the server is installed as a service, stop the service with the following command from the command prompt:

    C:\> SC STOP mysqld_service_name
          
         

    或者,使用 NET STOP mysqld_service_name 。Alternatively, use NET STOP mysqld_service_name .

    如果您没有以服务的方式运行 MySQL 服务器,请使用 mysqladmin 来停止它。例如,在从 MySQL 8.3 升级到 8.4 之前,请按如下方式使用 MySQL 8.3 的 mysqladmin:If you are not running the MySQL server as a service, use mysqladmin to stop it. For example, before upgrading from MySQL 8.3 to 8.4, use mysqladmin from MySQL 8.3 as follows:

    C:\> "C:\Program Files\MySQL\MySQL Server 8.3\bin\mysqladmin" -u root shutdown
         
    Note

    如果 MySQL root 用户账户有密码,请使用 mysqladmin 命令加上 -p 选项,并在提示时输入密码。If the MySQL root user account has a password, invoke mysqladmin with the -p option and enter the password when prompted.

  3. 解压 ZIP 压缩包。您可以选择覆盖现有的 MySQL 安装(通常位于 C:\mysql),或者安装到不同的目录,例如 C:\mysql8。推荐覆盖现有安装。Extract the ZIP archive. You may either overwrite your existing MySQL installation (usually located at C:\mysql), or install it into a different directory, such as C:\mysql8. Overwriting the existing installation is recommended.

  4. 重启服务器。例如,如果你以服务方式运行 MySQL,可以使用 SC START mysqld_service_name 或 NET START mysqld_service_name 命令,否则可以直接调用 mysqld。Restart the server. For example, use the SC START mysqld_service_name or NET START mysqld_service_name command if you run MySQL as a service, or invoke mysqld directly otherwise.

  5. 如果遇到错误,请参阅 第 2.3.4 节,“Microsoft Windows MySQL 服务器安装故障排除”。If you encounter errors, see Section 2.3.4, “Troubleshooting a Microsoft Windows MySQL Server Installation”.