支持的 Azure Database for MySQL 服务器版本Supported Azure Database for MySQL server versions

备注

将要查看的是 Azure Database for MySQL 的新服务。You are viewing the new service of Azure Database for MySQL. 若要查看经典 MySQL Database for Azure 的文档,请访问此页To view the documentation for classic MySQL Database for Azure, please visit this page.

使用 InnoDB 存储引擎通过 MySQL 社区版开发了 Azure Database for MySQL。Azure Database for MySQL has been developed from MySQL Community Edition, using the InnoDB storage engine. 服务支持社区支持的所有当前主版本,即 MySQL 5.6、5.7 和 8.0。The service supports all the current major version supported by the community namely MySQL 5.6, 5.7 and 8.0. MySQL 使用 X.Y.Z 命名方案,其中 X 为主版本,Y 为次要版本,Z 为 bug 修补版本。MySQL uses the X.Y.Z naming scheme where X is the major version, Y is the minor version, and Z is the bug fix release. 有关方案的详细信息,请参阅 MySQL 文档For more information about the scheme, see the MySQL documentation.

连接到运行特定 MySQL 版本的网关节点Connect to a gateway node that is running a specific MySQL version

在单一服务器部署选项中,网关用于将连接重定向到服务器实例。In the Single Server deployment option, a gateway is used to redirect the connections to server instances. 建立连接后,MySQL 客户端显示网关中设置的 MySQL 版本,而不是 MySQL 服务器实例上运行的实际版本。After the connection is established, the MySQL client displays the version of MySQL set in the gateway, not the actual version running on your MySQL server instance. 若要确定 MySQL 服务器实例的版本,可在 MySQL 提示符处使用 SELECT VERSION(); 命令。To determine the version of your MySQL server instance, use the SELECT VERSION(); command at the MySQL prompt. 查看连接体系结构,详细了解 Azure Database for MySQL 服务体系结构中的网关。Review Connectivity architecture to learn more about gateways in Azure Database for MySQL service architecture.

由于 Azure Database for MySQL 支持主要版本 v5.6、v5.7 和 v8.0,连接到 Azure Database for MySQL 的默认端口 3306 运行 MySQL 客户端版本 5.6(最低主要版本)以支持与所有 3 个受支持的主要版本的服务器建立连接。As Azure Database for MySQL supports major version v5.6, v5.7 and v8.0, the default port 3306 to connect to Azure Database for MySQL runs MySQL client version 5.6 (least common denominator) to support connections to servers of all 3 supported major versions. 但是,如果你的应用程序需要连接到特定的主要版本(例如 v5.7 或 v8.0),则可以通过更改服务器连接字符串中的端口来实现此目的。However, if your application has a requirement to connect to specific major version say v5.7 or v8.0, you can do so by changing the port in your server connection string.

在 Azure Database for MySQL 服务中,网关节点在端口 3308 上侦听 v5.7 客户端,在端口 3309 上侦听 v8.0 客户端。In Azure Database for MySQL service, gateway nodes listens on port 3308 for v5.7 clients and port 3309 for v8.0 clients. 换句话说,如果你希望连接到 v5.7 网关客户端,应使用完全限定的服务器名称和端口 3308 从客户端应用程序连接到服务器。In other words, if you would like to connect to v5.7 gateway client, you should use your fully qualified server name and port 3308 to connect to your server from client application. 同样,如果你希望连接到 v8.0 网关客户端,可使用完全限定的服务器名称和端口 3309 来连接到服务器。Similarly, if you would like to connect to v8.0 gateway client, you can use your fully qualified server name and port 3309 to connect to your server. 请查看下面的示例以进一步了解。Check the following example for further clarity.

通过不同网关 MySQL 版本连接的示例

Azure Database for MySQL 当前支持以下主版本和次要版本的 MySQL:Azure Database for MySQL currently supports the following major and minor versions of MySQL:

版本Version 单一服务器Single Server
当前次要版本Current minor version
MySQL 版本 5.6MySQL Version 5.6 5.6.47(已停用)5.6.47 (Retired)
MySQL 版本 5.7MySQL Version 5.7 5.7.295.7.29
MySQL 版本 8.0MySQL Version 8.0 8.0.158.0.15

阅读版本支持策略文档中的已停用版本的版本支持策略。Read the version support policy for retired versions in version support policy documentation.

管理更新和升级Managing updates and upgrades

该服务会自动管理针对 Bug 修复版本更新的修补。The service automatically manages patching for bug fix version updates. 例如,5.7.20 到 5.7.21。For example, 5.7.20 to 5.7.21.

服务当前支持从 MySQL v5.6 升级到 v5.7 的主版本升级。Major version upgrade is currently supported by service for upgrades from MySQL v5.6 to v5.7. 有关更多详细信息,请参阅如何进行主版本升级For more details, refer how to perform major version upgrades. 如果要从 5.7 升级到 8.0,建议转储和还原到使用新引擎版本创建的服务器。If you'd like to upgrade from 5.7 to 8.0, we recommend you perform dump and restore to a server that was created with the new engine version.

后续步骤Next steps

  • 有关 Azure Database for MySQL 版本控制策略的详细信息,请参阅此文档For details around Azure Database for MySQL versioning policy, see this document.
  • 有关基于服务层级的具体资源配额和限制的信息,请参阅服务层级For information about specific resource quotas and limitations based on your service tier, see Service tiers