Azure Database for MySQL 中的限制Limitations in Azure Database for MySQL


将要查看的是 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.

以下各部分介绍了数据库服务中的容量、存储引擎支持、特权支持、数据操作语句支持和功能限制。The following sections describe capacity, storage engine support, privilege support, data manipulation statement support, and functional limits in the database service. 另请参阅适用于 MySQL 数据库引擎的常规限制Also see general limitations applicable to the MySQL database engine.

服务器参数Server parameters


如果要查找服务器参数(如 max_connectionsinnodb_buffer_pool_size)的最小值/最大值,请参阅服务器参数一文。If you are looking for min/max values for server parameters like max_connections and innodb_buffer_pool_size, this information has moved to the server parameters article.

Azure Database for MySQL 支持优化服务器参数的值。Azure Database for MySQL supports tuning the values of server parameters. 某些参数(例如The min and max value of some parameters (ex. max_connectionsjoin_buffer_sizequery_cache_size)的最小值和最大值由服务器的定价层和 vCore 数决定。max_connections, join_buffer_size, query_cache_size) is determined by the pricing tier and vCores of the server. 有关这些限制的详细信息,请参阅服务器参数Refer to server parameters for more information about these limits.

初始部署后,Azure for MySQL 服务器包含用于时区信息的系统表,但这些表没有填充。Upon initial deployment, an Azure for MySQL server includes systems tables for time zone information, but these tables are not populated. 可以通过从 MySQL 命令行或 MySQL Workbench 等工具调用 mysql.az_load_timezone 存储过程来填充时区表。The time zone tables can be populated by calling the mysql.az_load_timezone stored procedure from a tool like the MySQL command line or MySQL Workbench. 若要了解如何调用存储过程并设置全局时区或会话级时区,请参阅 Azure 门户Azure CLI 一文。Refer to the Azure portal or Azure CLI articles for how to call the stored procedure and set the global or session-level time zones.

该服务不支持密码插件,例如“validate_password”和“caching_sha2_password”。Password plugins such as "validate_password" and "caching_sha2_password" are not supported by the service.

存储引擎Storage engines

MySQL 支持许多存储引擎。MySQL supports many storage engines. 在 Azure Database for MySQL 上,支持和不支持的存储引擎如下所示:On Azure Database for MySQL, the following storage engines are supported and unsupported:



权限和数据操作支持Privileges & data manipulation support

许多服务器参数和设置可能会无意中导致服务器性能下降或使 MySQL 服务器的 ACID 属性无效。Many server parameters and settings can inadvertently degrade server performance or negate ACID properties of the MySQL server. 为了在产品级别维护服务完整性和 SLA,此服务不公开多个角色。To maintain the service integrity and SLA at a product level, this service does not expose multiple roles.

MySQL 服务不允许直接访问基础文件系统。The MySQL service does not allow direct access to the underlying file system. 不支持某些数据操作命令。Some data manipulation commands are not supported.


不支持以下项:The following are unsupported:

  • DBA 角色:受限制。DBA role: Restricted. 另外,使用管理员用户(在新建服务器的过程中创建)可执行大部分 DDL 和 DML 语句。Alternatively, you can use the administrator user (created during new server creation), allows you to perform most of DDL and DML statements.
  • SUPER 特权:类似地,SUPER 特权也受到限制。SUPER privilege: Similarly, SUPER privilege is restricted.
  • DEFINER:需要创建并限制超级权限。DEFINER: Requires super privileges to create and is restricted. 如果使用备份导入数据,请在执行 mysqldump 时手动删除或使用 --skip-definer 命令删除 CREATE DEFINER 命令。If importing data using a backup, remove the CREATE DEFINER commands manually or by using the --skip-definer command when performing a mysqldump.
  • 系统数据库:mysql 系统数据库为只读数据库,用于支持各种 PaaS 功能。System databases: The mysql system database is read-only and used to support various PaaS functionality. 不能对 mysql 系统数据库进行更改。You cannot make changes to the mysql system database.
  • SELECT ... INTO OUTFILE:在该服务中不受支持。SELECT ... INTO OUTFILE: Not supported in the service.
  • LOAD_FILE(file_name):在该服务中不受支持。LOAD_FILE(file_name): Not supported in the service.


  • 支持 LOAD DATA INFILE,但必须指定 [LOCAL] 参数,并将其定向到 UNC 路径(通过 SMB 装载的 Azure 存储空间)。LOAD DATA INFILE is supported, but the [LOCAL] parameter must be specified and directed to a UNC path (Azure storage mounted through SMB).

功能限制Functional limitations

缩放操作Scale operations

  • 目前不支持动态缩放到“基本”定价层或从该层动态缩放。Dynamic scaling to and from the Basic pricing tiers is currently not supported.
  • 不支持减小服务器存储大小。Decreasing server storage size is not supported.

服务器版本升级Server version upgrades

  • 目前不支持在主要数据库引擎版本之间进行自动迁移。Automated migration between major database engine versions is currently not supported. 如果要升级到下一个主版本,请进行转储并将其还原到使用新引擎版本创建的服务器。If you would like to upgrade to the next major version, take a dump and restore it to a server that was created with the new engine version.


  • 使用 PITR 功能时,将使用与新服务器所基于的服务器相同的配置创建新服务器。When using the PITR feature, the new server is created with the same configurations as the server it is based on.
  • 不支持还原已删除的服务器。Restoring a deleted server is not supported.

VNet 服务终结点VNet service endpoints

  • 只有常规用途和内存优化服务器才支持 VNet 服务终结点。Support for VNet service endpoints is only for General Purpose and Memory Optimized servers.

存储大小Storage size

  • 有关每个定价层的存储大小限制,请参阅定价层Please refer to pricing tiers for the storage size limits per pricing tier.

当前已知的问题Current known issues

  • 建立连接后,MySQL 服务器实例显示错误的服务器版本。MySQL server instance displays the wrong server version after connection is established. 若要获取正确的服务器实例引擎版本,请使用 select version(); 命令。To get the correct server instance engine version, use the select version(); command.

后续步骤Next steps