使用火山引擎 RDS MySQL MCP Server,帮助用户完成 RDS MySQL 相关的实例管理、数据库操作、账号管理和运维任务,可直接调用 uv run ./scripts/call_rds_mysql.py 脚本获取实时结果。
本 Skill 用于在对话中充当 火山引擎 RDS MySQL 的智能运维代理:
scripts/call_rds_mysql.py 实时查询 RDS MySQL 并获取结果;工作模式:
scripts/call_rds_mysql.py 脚本直接获取 RDS MySQL 的实时响应运行方式: 脚本支持两种运行方式:
bash
# 方式 1: 使用 uv (推荐,自动管理依赖)
uv run ./scripts/call_rds_mysql.py [action] [options]
# 方式 2: 使用 python (需要预先安装依赖)
python ./scripts/call_rds_mysql.py [action] [options]
--region:地域 ID(默认 cn-beijing)--action:操作类型(如 list-instances、 describe-instance、 list-databases 等)--instance-id:实例 ID(部分操作必需)示例(以下命令可使用 uv run 或 python 运行):
bash
# 查询实例列表
uv run ./scripts/call_rds_mysql.py list-instances
# 或
python ./scripts/call_rds_mysql.py list-instances
# 查询指定实例详情
uv run ./scripts/call_rds_mysql.py describe-instance --instance-id mysql-xxx
# 或
python ./scripts/call_rds_mysql.py describe-instance --instance-id mysql-xxx
# 查询实例的数据库列表
uv run ./scripts/call_rds_mysql.py list-databases --instance-id mysql-xxx
# 或
python ./scripts/call_rds_mysql.py list-databases --instance-id mysql-xxx
# 查询实例的账号列表
uv run ./scripts/call_rds_mysql.py list-accounts --instance-id mysql-xxx
# 或
python ./scripts/call_rds_mysql.py list-accounts --instance-id mysql-xxx
# 查询实例参数
uv run ./scripts/call_rds_mysql.py list-parameters --instance-id mysql-xxx
# 或
python ./scripts/call_rds_mysql.py list-parameters --instance-id mysql-xxx
# 查询 VPC 列表(用于创建实例)
uv run ./scripts/call_rds_mysql.py list-vpcs
# 或
python ./scripts/call_rds_mysql.py list-vpcs
# 查询子网列表
uv run ./scripts/call_rds_mysql.py list-subnets --vpc-id vpc-xxx --zone-id cn-beijing-a
# 或
python ./scripts/call_rds_mysql.py list-subnets --vpc-id vpc-xxx --zone-id cn-beijing-a
操作说明必需参数list-instances查询 RDS MySQL 实例列表无describe-instance查询指定实例详情--instance-id``list-databases查询实例的数据库列表--instance-id``list-accounts查询实例的账号列表--instance-id``list-parameters查询实例的参数配置--instance-id``list-parameter-templates查询参数模板列表无describe-parameter-template查询参数模板详情--template-id``list-vpcs查询 VPC 列表无list-subnets查询子网列表--vpc-id``get-price查询实例价格多个配置参数
参数说明默认值action操作类型(必需)---region / -r火山引擎地域 IDcn-beijing``--instance-id / -i实例 ID无--page-number分页页码1``--page-size每页记录数10``--output / -o输出格式(json/table)json
脚本会将查询信息输出到 stderr,将结果输出到 stdout,便于分离日志和结果:
text
[操作] list-instances
[地域] cn-beijing
============================================================
[查询结果]
<实际结果内容>
bash
uv run ./scripts/call_rds_mysql.py list-instances
bash
uv run ./scripts/call_rds_mysql.py describe-instance --instance-id mysql-xxx
bash
uv run ./scripts/call_rds_mysql.py list-databases --instance-id mysql-xxx
bash
uv run ./scripts/call_rds_mysql.py list-accounts --instance-id mysql-xxx
bash
uv run ./scripts/call_rds_mysql.py list-parameters --instance-id mysql-xxx
bash
# 先查询 VPC
uv run ./scripts/call_rds_mysql.py list-vpcs
# 再查询子网
uv run ./scripts/call_rds_mysql.py list-subnets --vpc-id vpc-xxx --zone-id cn-beijing-a
获取火山引擎访问凭证:参考 用户指南 获取 AK/SK
配置以下环境变量:
bash
export VOLCENGINE_ACCESS_KEY="your-access-key"
export VOLCENGINE_SECRET_KEY="your-secret-key"
export VOLCENGINE_REGION="cn-beijing" # 可选,默认 cn-beijing