使用 Azure 门户在 Azure Database for MySQL 单一服务器中升级主版本Major version upgrade in Azure Database for MySQL Single Server using the Azure portal

重要

Azure Database for MySQL 单一服务器的主版本升级为公共预览版。Major version upgrade for Azure database for MySQL Single Server is in public preview.

本文介绍了如何就地升级 Azure Database for MySQL 单一服务器中的 MySQL 主版本。This article describes how you can upgrade your MySQL major version in-place in Azure Database for MySQL single server.

利用此功能,客户可以轻松地将 MySQL 5.6 服务器就地升级到 MySQL 5.7,无需移动任何数据,也无需更改应用程序连接字符串。This feature will enable customers to perform in-place upgrades of their MySQL 5.6 servers to MySQL 5.7 with a click of button without any data movement or the need of any application connection string changes.

备注

  • 主版本升级仅适用于从 MySQL 5.6 到 MySQL 5.7 的升级Major version upgrade is only available for major version upgrade from MySQL 5.6 to MySQL 5.7
  • 副本服务器尚不支持主版本升级。Major version upgrade is not supported on replica server yet.
  • 在整个升级操作过程中,服务器将不可用。The server will be unavailable throughout the upgrade operation. 因此,建议在计划内维护时段执行升级。It is therefore recommended to perform upgrades during your planned maintenance window.

先决条件Prerequisites

若要完成本操作指南,需要:To complete this how-to guide, you need:

执行从 MySQL 5.6 到 MySQL 5.7 的主版本升级Perform major version upgrade from MySQL 5.6 to MySQL 5.7

按照以下步骤为你的 Azure Database for MySQL 5.6 服务器执行主版本升级Follow these steps to perform major version upgrade for your Azure Database of MySQL 5.6 server

重要

建议首先在还原后的服务器副本上执行升级,而不是直接升级生产服务器。We recommend to perform upgrade first on restored copy of the server rather than upgrading production directly. 请参阅如何执行时间点还原See how to perform point-in-time restore.

  1. Azure 门户中,选择你的现有 Azure Database for MySQL 5.6 服务器。In the Azure portal, select your existing Azure Database for MySQL 5.6 server.

  2. 从“概述”页上,单击工具栏中的“升级”按钮。From the Overview page, click the Upgrade button in the toolbar.

  3. 在“升级”部分,选择“确定”以将 Azure database for MySQL 5.6 服务器升级为 5.7 服务器。In the Upgrade section, select OK to upgrade Azure database for MySQL 5.6 server to 5.7 server.

    Azure Database for MySQL - 概述 - 升级

  4. 一条通知会确认升级是否成功。A notification will confirm that upgrade is successful.

常见问题Frequently asked questions

1.我们的生产环境中有需要升级的 MySQL v5.6,此升级功能什么时候将正式发布?1. When will this upgrade feature be GA as we have MySQL v5.6 in our production environment that we need to upgrade?

计划在 MySQL v5.6 停用之前正式发布此功能。The GA of this feature is planned before MySQL v5.6 retirement. 但是,此功能已准备好用于生产环境,并且由 Azure 提供完全支持,因此你应该可以放心地在你的环境中运行它。However, the feature is production ready and fully supported by Azure so you should run it with confidence on your environment. 强烈建议你首先在还原后的服务器副本上运行和测试它,以便你可以估计升级期间的停机时间,并执行应用程序兼容性测试,然后再在生产环境中运行应用程序。这是推荐的最佳做法。As a recommended best practice, we strongly suggest you to run and test it first on a restored copy of the server so you can estimate the downtime during upgrade, and perform application compatibility test before you run it on production. 有关详细信息,请参阅如何执行时间点还原(用于创建服务器的时间点副本)。For more information, see how to perform point-in-time restore to create a point in time copy of your server.

2.这是否会导致服务器停机?如果是,会停机多长时间?2. Will this cause downtime of the server and if so, how long?

是的,服务器在升级过程中将不可用。因此,我们建议你在计划内维护时段执行此操作。Yes, the server will be unavailable during the upgrade process so we recommend you perform this operation during your planned maintenance window. 估计的停机时间取决于数据库大小、预配的存储大小(预配的 IOPS)以及数据库中的表的数量。The estimated downtime depends on the database size, storage size provisioned (IOPs provisioned), and the number of tables on the database. 升级时间与服务器中表的数量成正比。基本 SKU 服务器的升级预计需要更长时间,因为它在标准存储平台上。The upgrade time is directly proportional to the number of tables on the server.The upgrades of Basic SKU servers are expected to take longer time as it is on standard storage platform. 为了估计服务器环境的停机时间,建议你首先在还原后的服务器副本上执行升级。To estimate the downtime for your server environment, we recommend to first perform upgrade on restored copy of the server.

3.请注意,副本服务器尚不支持此功能。这具体意味着什么?3. It is noted that it is not supported on replica server yet. What does that mean concrete?

当前,副本服务器不支持主版本升级,这意味着不应为复制所涉及的服务器(源服务器或副本服务器)运行主版本升级。Currently, major version upgrade is not supported for replica server, which means you should not run it for servers involved in replication (either source or replica server). 如果要在添加对升级功能的副本支持之前测试复制中涉及的服务器的升级,建议执行以下步骤:If you would like to test the upgrade of the servers involved in replication before we add the replica support for upgrade feature, we would recommend following steps:

  1. 在计划内维护期间,在捕获副本服务器的名称和所有配置信息(防火墙设置、服务器参数配置,如果它与源服务器不同)后停止复制并删除副本服务器During your planned maintenance, stop replication and delete replica server after capturing its name and all the configuration information (Firewall settings, server parameter configuration if it is different from source server).
  2. 执行源服务器的升级。Perform upgrade of the source server.
  3. 使用在步骤 1 中捕获的名称和配置设置来预配新的只读副本服务器。Provision a new read replica server with the same name and configuration settings captured in step 1. 将源服务器升级到 v5.7 后,新的副本服务器会自动为 v5.7。The new replica server will be on v5.7 automatically after the source server is upgraded to v5.7.

4.如果未选择在 2021 年 2 月 5 日之前升级 MySQL 5.6 服务器,会发生什么情况?4. What will happen if we do not choose to upgrade our MySQL v5.6 server before February 5, 2021?

你仍可像以前一样继续运行 MySQL v5.6 服务器。You can still continue running your MySQL v5.6 server as before. Azure 永远不会在服务器上执行强制升级。Azure will never perform force upgrade on your server. 但是,会应用 Azure Database for MySQL 版本控制策略中所述的限制。However, the restrictions documented in Azure Database for MySQL versioning policy will apply.

后续步骤Next steps

了解 Azure Database for MySQL 版本控制策略Learn about Azure Database for MySQL versioning policy.