mcpField
A
azure-database-mysql

azure-database-mysql

github.com/microsoftdocs数据与数据库796190 次安装3 天前更新
代码仓库

关于 azure-database-mysql

面向支持数据库规划与运维的 Agent,提供 Azure Database for MySQL 指导。内容结合本地速查资料与联网文档获取,涵盖故障排查、安全、配置和部署。

主要功能

  1. 01故障排查与运维指导
  2. 02架构和服务层级选择
  3. 03安全与配置参考
  4. 04迁移和部署指导
  5. 05本地参考与远程文档获取

适用场景

  1. 01诊断连接或查询性能问题
  2. 02规划迁移 MySQL 到 Azure
  3. 03评估安全与高可用选项

MCP 相关

该技能建议使用 `mcp_microsoftdocs:microsoft_docs_fetch` 工具获取 Microsoft 文档,并提供 `fetch_webpage` 作为备用方式。

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/microsoftdocs/agent-skills --skill azure-database-mysql

安装后在 Claude Code 中输入/azure-database-mysql确认已加载。

详细介绍

Azure Database for MySQL 技能

此技能提供有关 Azure Database for MySQL 的专业指导,涵盖故障排除、最佳实践、决策、架构与设计模式、限制与配额、安全性、配置、集成与编码模式,以及部署。它结合了本地快速参考内容与远程文档获取功能。

如何使用此技能

重要提示(面向 Agent):使用下方的类别索引查找相关部分。对于包含行范围的类别(例如 L35-L120),使用 read_file 读取指定行。对于包含文件链接的类别(例如 [security.md](security.md)),使用 read_file 读取链接指向的参考文件。

重要提示(面向 Agent):如果 metadata.generated_at 距今超过 3 个月,请建议用户从代码仓库获取最新版本。如果无法使用 mcp_microsoftdocs 工具,请建议用户安装该工具:安装指南

此技能需要网络访问权限,以获取文档内容:

  • 首选:使用 mcp_microsoftdocs:microsoft_docs_fetch,查询字符串为 from=learn-agent-skill。返回 Markdown。
  • 备用:使用 fetch_webpage,查询字符串为 from=learn-agent-skill&accept=text/markdown。返回 Markdown。

类别索引

类别行描述
故障排除L37-L53诊断和解决 MySQL Flexible Server 问题:连接和 CLI 错误、性能(CPU/内存/查询)、容量、损坏、复制延迟,以及使用日志/自我修复工具。
最佳实践L54-L73Azure Database for MySQL 的监视、性能优化、维护、只读副本、BCDR、故障排除、安全重启,以及迁移/迁移后优化方面的最佳实践。
决策L74-L90在 Azure 上规划 MySQL 的指导:版本策略、高可用性/灾难恢复与业务连续性、容量规划与层级、性能基线,以及选择/迁移到/升级到 Flexible Server。
架构与设计模式L91-L97AKS 连接 MySQL Flexible Server、设计备份/还原、数据导入/导出复制、(区域冗余)高可用性,以及基于只读副本进行扩展的模式。
限制与配额L98-L106MySQL Flexible Server 的限制、配额和性能上限:最大连接数/核心数/IOPS、存储 IOPS 行为、配额提升请求、重启/停止限制,以及删除/还原时间限制。
安全性L107-L132Azure MySQL 的网络、身份验证和加密安全性:专用/公共访问、防火墙、TLS、证书轮换、审核日志、CMK/静态数据加密、Entra 身份验证,以及安全的用户/迁移设置。
配置L133-L163配置 Azure Database for MySQL Flexible Server:参数、高可用性、网络、日志记录、监视、警报、维护时段、复制、扩展、备份和只读副本。
集成与编码模式L164-L175将应用和工具连接到 MySQL Flexible Server(CLI、JDBC、Power BI)、管理连接字符串,以及使用各种工具从 RDS、本地/VM 或大型数据库迁移 MySQL 数据。
部署L176-L184自动化 MySQL Flexible Server 部署与更改(Azure Pipelines、GitHub Actions、Automation),处理备份、异地还原、版本升级和计划维护。
故障排除
主题URL
使用 MySQL Flexible Server 错误日志进行故障排除https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-error-logs
解决 Azure MySQL Flexible Server 中的数据库损坏问题https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-fix-corrupt-database
使用自我修复功能自动修复 MySQL Flexible Server 问题https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-self-heal
排查 Azure MySQL Flexible Server CLI 错误https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-cli-errors
诊断并修复 MySQL Flexible Server 连接问题https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-common-connection-issues
排查 MySQL Flexible Server 中常见的迁移和使用错误https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-common-errors
排查 MySQL Flexible Server 中的连接问题和连接处理问题https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-connectivity-issues
诊断并解决 Azure Database for MySQL Flexible Server 中的 CPU 使用率过高问题https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-high-cpu-utilization
排查 MySQL Flexible Server 中的内存不足问题https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-low-memory-issues
排查 MySQL Flexible Server 中的查询性能问题https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-query-performance-new
诊断并修复 MySQL Flexible Server 容量错误https://learn.microsoft.com/en-us/azure/mysql/flexible-server/resolve-capacity-errors
使用 Query Performance Insight 诊断 Azure MySQL 查询https://learn.microsoft.com/en-us/azure/mysql/flexible-server/tutorial-query-performance-insights
排查 MySQL Flexible Server 只读副本上的复制延迟https://learn.microsoft.com/en-us/azure/mysql/how-to-troubleshoot-replication-latency
最佳实践
主题URL
实施 MySQL 灵活服务器的监控最佳实践https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concept-monitor-best-practices
应用 Azure Database for MySQL 的运维最佳实践https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concept-operation-excellence-best-practices
在 Azure MySQL 灵活服务器上有效运行性能基准测试https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concept-perf-benchmark-best-practices
优化 Azure MySQL 灵活服务器的性能https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concept-performance-best-practices
使用 Azure Monitor 和 Advisor 确保 MySQL 业务连续性https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-business-continuity-advisor-monitor
遵循 Azure Database for MySQL 的维护最佳实践https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-maintenance
在 Azure MySQL 灵活服务器中配置和管理只读副本https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-read-replicas
应用 MySQL 灵活服务器的故障排除最佳实践https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-troubleshooting-best-practices
防止并恢复意外删除的 MySQL 灵活服务器https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-prevent-recover-accidental-delete
通过门户安全地重启 Azure MySQL 灵活服务器https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-restart-server-portal
使用 EXPLAIN 分析并优化 MySQL 灵活服务器查询https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-query-performance
使用 sys_schema 诊断 MySQL 灵活服务器中的性能问题https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-sys-schema
将数据从本地 MySQL 迁移到 Azurehttps://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/08-data-migration
迁移后管理 Azure Database for MySQLhttps://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/10-post-migration-management
迁移后优化 Azure Database for MySQL 的性能https://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/11-optimization
为 Azure Database for MySQL 迁移设计 BCDRhttps://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/12-business-continuity-and-disaster-recovery
决策
主题URL
应用 Azure Database for MySQL 版本支持策略https://learn.microsoft.com/en-us/azure/mysql/concepts-version-policy
选择并购买 MySQL Flexible Server 预留容量https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concept-reserved-pricing
规划 MySQL Flexible Server 的业务连续性https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-business-continuity
MySQL Flexible Server 高可用性常见问题与选项https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-high-availability-faq
选择 MySQL Flexible Server 服务层级和存储https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-service-tiers-storage
以最短停机时间将 MySQL 迁移到 Azure flexible serverhttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-migrate-online
规划并执行 Azure MySQL 主版本升级https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-upgrade
规划 Azure Database for MySQL 主版本升级https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-upgrade-faq
规划并执行 MySQL 到 Azure Database 的迁移https://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/01-mysql-migration-guide-intro
评估本地 MySQL,以便迁移到 Azurehttps://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/03-assessment
规划 Azure Database for MySQL 迁移着陆区https://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/04-planning
选择迁移到 Azure Database for MySQL 的方法https://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/05-migration-methods
为 MySQL 迁移到 Azure 建立性能基准https://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/07-performance-baselines
架构与设计模式
主题URL
将 Azure Kubernetes Service 连接到 MySQL Flexible Serverhttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-aks
设计复制数据到 MySQL Flexible Serverhttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-data-in-replication
设计从 MySQL Flexible Server 复制数据https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-data-out-replication
限制与配额
主题URL
Azure MySQL Flexible Server 的服务限制https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-limitations
MySQL Flexible Server 的存储 IOPS 性能特征https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-storage-iops
申请提高 Azure MySQL Flexible Server 配额https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-request-quota-increase
在保留期限限制内还原已删除的 Azure MySQL flexible servershttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-restore-dropped-server
在停止时长限制内重启、停止和启动 MySQL flexible serverhttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-restart-stop-start
安全性
主题URL
将 Private Link 用于 Azure MySQL 灵活服务器https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-networking-private-link
配置 MySQL 灵活服务器的公共网络访问https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-networking-public
配置 MySQL 灵活服务器的专用网络访问https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-networking-vnet
使用 Azure CLI 配置 Azure MySQL Private Linkhttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-networking-private-link-azure-cli
通过门户拒绝 Azure MySQL 的公共网络访问https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-networking-private-link-deny-public-access
使用门户通过 Private Link 保护 Azure MySQLhttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-networking-private-link-portal
创建并连接到具有专用访问权限的 MySQL 灵活服务器https://learn.microsoft.com/en-us/azure/mysql/flexible-server/quickstart-create-connect-server-vnet
通过 CLI 配置 MySQL 灵活服务器的审核日志记录https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-audit-logs
配置和分析 Azure MySQL 的审核日志https://learn.microsoft.com/en-us/azure/mysql/flexible-server/tutorial-configure-audit
在迁移期间和迁移后保护 Azure Database for MySQLhttps://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/13-security
使用客户管理的密钥加密 Azure MySQLhttps://learn.microsoft.com/en-us/azure/mysql/security/security-customer-managed-key
为 Azure MySQL 配置 Microsoft Entra 身份验证https://learn.microsoft.com/en-us/azure/mysql/security/security-entra-authentication
在 Azure 中安全地创建和管理 MySQL 用户https://learn.microsoft.com/en-us/azure/mysql/security/security-how-to-create-users
使用 CLI 配置 Azure MySQL 数据加密https://learn.microsoft.com/en-us/azure/mysql/security/security-how-to-data-encryption-cli
在 Azure MySQL 门户中配置静态数据加密https://learn.microsoft.com/en-us/azure/mysql/security/security-how-to-data-encryption-portal
为 Azure MySQL 配置 Microsoft Entra 身份验证https://learn.microsoft.com/en-us/azure/mysql/security/security-how-to-entra
使用 CLI 配置 Azure MySQL 防火墙规则https://learn.microsoft.com/en-us/azure/mysql/security/security-how-to-manage-firewall-cli
在门户中管理 Azure MySQL 防火墙规则https://learn.microsoft.com/en-us/azure/mysql/security/security-how-to-manage-firewall-portal
应用 Azure Database for MySQL 的安全配置https://learn.microsoft.com/en-us/azure/mysql/security/security-overview
使用 TLS 安全连接到 Azure MySQLhttps://learn.microsoft.com/en-us/azure/mysql/security/security-tls-how-to-connect
管理 Azure MySQL TLS 根证书轮换https://learn.microsoft.com/en-us/azure/mysql/security/security-tls-root-certificate-rotation
Azure MySQL TLS 证书轮换常见问题https://learn.microsoft.com/en-us/azure/mysql/security/security-tls-root-certificate-rotation-faq
配置
主题URL
在 MySQL Flexible Server 中使用内置存储过程https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-built-in-store-procedure
为 MySQL Flexible Server 配置监视和警报https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-monitor-mysql
Azure Database for MySQL 监视指标参考https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-monitor-mysql-reference
为 Azure MySQL Flexible Server 配置服务器参数https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-server-parameters
为 Azure MySQL 设置基于指标的警报https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-alert-on-metric
通过门户启用或禁用区域冗余高可用性https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-configure-high-availability
通过 CLI 为 Azure MySQL 配置区域冗余高可用性https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-configure-high-availability-cli
通过 Azure CLI 配置 MySQL Flexible Server 参数https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-configure-server-parameters-cli
在 Azure 门户中配置 MySQL Flexible Server 参数https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-configure-server-parameters-portal
配置数据复制到 Azure MySQL Flexible Serverhttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-data-in-replication
配置从 Azure MySQL Flexible Server 复制数据https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-data-out-replication
为 Azure MySQL 配置计划维护时段https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-maintenance-portal
通过 CLI 为 Azure MySQL 配置专用 VNet 连接https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-manage-virtual-network-cli
通过门户为 Azure MySQL 配置专用 VNet 连接https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-manage-virtual-network-portal
使用 CLI 创建和管理 Azure MySQL 只读副本https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-read-replicas-cli
通过门户创建和管理 Azure MySQL 只读副本https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-read-replicas-portal
使用 CLI 列出和下载 Azure MySQL 服务器日志https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-server-logs-cli
通过门户启用和下载 Azure MySQL 服务器日志https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-server-logs-portal
通过 CLI 列出和修改 MySQL Flexible Server 参数https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-change-server-parameters
通过 CLI 创建具有 VNet 专用访问权限的 MySQL Flexible Serverhttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-create-connect-private-access
通过 CLI 配置 MySQL Flexible Server 的公共访问和防火墙https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-create-connect-public-access
监视和扩展 MySQL Flexible Server 的计算、存储和 IOPShttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-monitor-and-scale
通过 CLI 创建和管理 MySQL Flexible Server 只读副本https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-read-replicas
通过 CLI 将 Azure MySQL Flexible Server 还原到某个时间点https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-restore-server
为 MySQL Flexible Server 配置同区域高可用性https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-same-zone-ha
通过 CLI 为 MySQL Flexible Server 配置慢查询日志记录https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-slow-query-logs
为 MySQL Flexible Server 配置区域冗余高可用性https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-zone-redundant-ha
集成与编码模式
主题URL
使用 Azure CLI 命令连接到 MySQL Flexible Serverhttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/connect-azure-cli
使用 JDBC 将 Java 应用程序连接到 MySQL Flexible Serverhttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/connect-java
将 Azure MySQL Flexible Server 连接到 Power BI Desktophttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/connect-with-powerbi-desktop
使用数据传入复制将 Amazon RDS MySQL 迁移到 Azure flexible serverhttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-migrate-rds-mysql-data-in-replication
在 Azure Key Vault 中存储 MySQL Flexible Server 连接字符串https://learn.microsoft.com/en-us/azure/mysql/flexible-server/tutorial-add-mysql-connection-in-key-vault
使用 mydumper/myloader 迁移大型 MySQL 数据库https://learn.microsoft.com/en-us/azure/mysql/migrate/concepts-migrate-mydumper-myloader
使用 Import CLI 将本地或 VM 上的 MySQL 迁移到 Azure flexible serverhttps://learn.microsoft.com/en-us/azure/mysql/migrate/migrate-external-mysql-import-cli
使用 MySQL Workbench 将 MySQL 数据迁移到 Azurehttps://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/09-data-migration-with-mysql-workbench
部署
主题URL
为 Azure MySQL 部署配置 Azure Pipelines 任务https://learn.microsoft.com/en-us/azure/mysql/flexible-server/azure-pipelines-deploy-database-task
创建用于管理 MySQL Flexible Server 的 Azure Automation 任务https://learn.microsoft.com/en-us/azure/mysql/flexible-server/create-automation-tasks
使用地理还原在区域之间移动 Azure MySQL Flexible Serverhttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-move-regions
使用 CLI 从备份还原 Azure MySQL Flexible Serverhttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-restore-server-cli
通过门户从备份还原 Azure MySQL Flexible Serverhttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-restore-server-portal
使用 GitHub Actions 将更改部署到 Azure MySQLhttps://learn.microsoft.com/en-us/azure/mysql/flexible-server/quickstart-mysql-github-actions

评论

支持 Markdown