polardbx-zero

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PolarDB-X Zero

PolarDB-X Zero

Provisions a dedicated PolarDB-X database instance via a single unauthenticated API call. No sign-up or billing is required to start. Instances are kept for up to 1 days (configurable via
ttlMinutes
, max 30 days). Treat Zero as disposable infrastructure, not an unlimited long-running environment.
PolarDB-X is a MySQL-compatible distributed database supporting distributed transactions, vector search (
VECTOR
type + vector indexes), full-text search, and horizontal scaling. Use standard MySQL clients/drivers to connect.
无需认证,通过单次API调用即可部署专属PolarDB-X数据库实例。无需注册或开通计费即可使用。实例最长保留1天(可通过
ttlMinutes
配置,最多30天)。请将Zero视为一次性基础设施,而非可长期运行的无限环境。
PolarDB-X是一款兼容MySQL的分布式数据库,支持分布式事务、向量检索(
VECTOR
类型+向量索引)、全文检索与水平扩展。可使用标准MySQL客户端/驱动进行连接。

Common Use Cases

常见使用场景

  • AI agent memory: keep structured state, tool outputs, and retrieval data in one MySQL-compatible backend.
  • MCP server storage: provision a disposable SQL database behind MCP tools or custom protocol servers.
  • RAG and retrieval demos: combine relational data with vector search and full-text search in one temporary environment.
  • Temporary database workflows: spin up isolated MySQL-compatible sandboxes for tutorials, demos, evals, and short-lived tests.
  • AI Agent 内存存储:在兼容MySQL的后端中存储结构化状态、工具输出与检索数据。
  • MCP服务器存储:在MCP工具或自定义协议服务器后方部署一次性SQL数据库。
  • RAG与检索演示:在临时环境中结合关系型数据、向量检索与全文检索功能。
  • 临时数据库工作流:为教程、演示、评估与短期测试创建独立的兼容MySQL的沙箱环境。

Important Notes

重要说明

  • The API is unauthenticated and free to start. Instances auto-expire — treat credentials as short-lived and low-sensitivity.
  • Prefer environment variables (e.g.
    MYSQL_PWD
    ) over CLI arguments to avoid leaking passwords in shell history.
  • Each IP can have a limited number of active instances concurrently (dedicated instances are resource-heavy).
  • Each instance is a full 2C4G PolarDB-X standard edition with full admin privileges.
  • The instance security whitelist is automatically set to the requesting IP. Connections from other IPs will be rejected.
  • Do not promise unlimited usage. Zero is a disposable sandbox. For long-term or production use, purchase your own PolarDB-X instance on Alibaba Cloud.
  • If you need another disposable sandbox, create a fresh Zero instance instead of trying to renew the current one.
  • Always pass
    "ttlMinutes": 1440
    (1 days) when creating instances. You may use a shorter TTL if the task needs less time, but never exceed the system maximum (43200 minutes / 30 days).
  • API无需认证,可免费使用。实例会自动过期——请将凭证视为短期且低敏感度的信息。
  • 优先使用环境变量(如
    MYSQL_PWD
    )而非CLI参数,避免在Shell历史中泄露密码。
  • 每个IP同时可运行的实例数量有限(专属实例占用资源较多)。
  • 每个实例均为完整的2核4G PolarDB-X标准版,拥有完整的管理员权限。
  • 实例安全白名单会自动设置为请求IP,其他IP的连接将被拒绝。
  • 请勿承诺无限使用。Zero是一次性沙箱环境。如需长期使用或生产环境,请在阿里云购买专属PolarDB-X实例。
  • 若需要新的一次性沙箱,请创建全新的Zero实例,而非尝试续期现有实例。
  • 创建实例时请务必传入
    "ttlMinutes": 1440
    (1天)。若任务所需时间更短,可使用更短的TTL,但不得超过系统最大值(43200分钟/30天)。

API

API

Create Instance

创建实例

POST
https://zero.polardbx.com/api/v1/instances
Content-Type:
application/json
Request body (all fields optional):
json
{
  "tag": "",
  "ttlMinutes": 1440
}
  • tag
    : optional label to identify the caller.
  • ttlMinutes
    : instance TTL in minutes. Default: 1440 (1 days). Must be > 0 and <= 43200 (30 days). Use a shorter value if you need less time; omitting it uses the recommended default.
Response (
200
):
json
{
  "instance": {
    "id": "pxz_a1b2c3d4e5f6",
    "connection": {
      "host": "pxzeroxxxxxxxxxx.polarx.rds.aliyuncs.com",
      "port": 3306,
      "username": "pxz_12345678",
      "password": "Px$9aB3cD7eF1gH",
      "database": ""
    },
    "connectionString": "mysql://pxz_12345678:Px%249aB3cD7eF1gH@pxzeroxxxxxxxxxx.polarx.rds.aliyuncs.com:3306",
    "createdAt": "2026-03-20T10:30:00.000Z",
    "expiresAt": "2026-03-27T10:30:00.000Z",
    "ttlDays": 0,
    "ttlMinutes": 1440,
    "status": "ready"
  }
}
Use
instance.connectionString
for immediate driver connections. The instance is destroyed at
expiresAt
; there is no renewal API.
POST
https://zero.polardbx.com/api/v1/instances
Content-Type:
application/json
请求体(所有字段可选):
json
{
  "tag": "",
  "ttlMinutes": 1440
}
  • tag
    : 可选标签,用于标识调用方。
  • ttlMinutes
    : 实例的存活时间(分钟)。默认值:1440(1天)。必须大于0且不超过43200(30天)。若任务所需时间更短,可使用更小的值;省略则使用推荐默认值。
响应(
200
):
json
{
  "instance": {
    "id": "pxz_a1b2c3d4e5f6",
    "connection": {
      "host": "pxzeroxxxxxxxxxx.polarx.rds.aliyuncs.com",
      "port": 3306,
      "username": "pxz_12345678",
      "password": "Px$9aB3cD7eF1gH",
      "database": ""
    },
    "connectionString": "mysql://pxz_12345678:Px%249aB3cD7eF1gH@pxzeroxxxxxxxxxx.polarx.rds.aliyuncs.com:3306",
    "createdAt": "2026-03-20T10:30:00.000Z",
    "expiresAt": "2026-03-27T10:30:00.000Z",
    "ttlDays": 0,
    "ttlMinutes": 1440,
    "status": "ready"
  }
}
可使用
instance.connectionString
直接通过驱动连接。实例将在
expiresAt
时间被销毁,暂无续期API。

Query Instance

查询实例

GET
https://zero.polardbx.com/api/v1/instances/:id
Returns instance connection endpoint and status. Note:
username
and
password
are only returned at creation time and cannot be retrieved later.
Response (
200
):
json
{
  "instance": {
    "id": "pxz_a1b2c3d4e5f6",
    "connection": {
      "host": "pxzeroxxxxxxxxxx.polarx.rds.aliyuncs.com",
      "port": 3306,
      "username": "",
      "password": "",
      "database": ""
    },
    "connectionString": "mysql://pxzeroxxxxxxxxxx.polarx.rds.aliyuncs.com:3306",
    "createdAt": "2026-03-20T10:30:00.000Z",
    "expiresAt": "2026-03-27T10:30:00.000Z",
    "ttlDays": 0,
    "ttlMinutes": 1440,
    "status": "ready"
  }
}
GET
https://zero.polardbx.com/api/v1/instances/:id
返回实例的连接端点与状态。注意:
username
password
仅在创建时返回,后续无法找回。
响应(
200
):
json
{
  "instance": {
    "id": "pxz_a1b2c3d4e5f6",
    "connection": {
      "host": "pxzeroxxxxxxxxxx.polarx.rds.aliyuncs.com",
      "port": 3306,
      "username": "",
      "password": "",
      "database": ""
    },
    "connectionString": "mysql://pxzeroxxxxxxxxxx.polarx.rds.aliyuncs.com:3306",
    "createdAt": "2026-03-20T10:30:00.000Z",
    "expiresAt": "2026-03-27T10:30:00.000Z",
    "ttlDays": 0,
    "ttlMinutes": 1440,
    "status": "ready"
  }
}

Release Instance

释放实例

DELETE
https://zero.polardbx.com/api/v1/instances/:id
Proactively release an instance before expiration. The underlying resources will be cleaned up asynchronously.
Response (
200
):
json
{
  "instance": {
    "id": "pxz_a1b2c3d4e5f6",
    "status": "released",
    "releasedAt": "2026-03-20T12:00:00.000Z"
  }
}
DELETE
https://zero.polardbx.com/api/v1/instances/:id
在实例过期前主动释放。底层资源将被异步清理。
响应(
200
):
json
{
  "instance": {
    "id": "pxz_a1b2c3d4e5f6",
    "status": "released",
    "releasedAt": "2026-03-20T12:00:00.000Z"
  }
}

Error Responses

错误响应

All error responses use the following format:
json
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable description"
  }
}
HTTP StatusCodeDescription
400
INVALID_TTL
Invalid ttlMinutes value (must be > 0 and <= system default).
429
RATE_LIMIT_EXCEEDED
Too many requests or max active instances per IP reached. Wait before retrying.
503
POOL_EXHAUSTED
No available instances in the pool. Try again later.
404
INSTANCE_NOT_FOUND
Instance not found or has expired.
500
INTERNAL_ERROR
Unexpected server error.
所有错误响应均采用以下格式:
json
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable description"
  }
}
HTTP状态码代码描述
400
INVALID_TTL
ttlMinutes
值无效(必须大于0且不超过系统最大值)。
429
RATE_LIMIT_EXCEEDED
请求过多或单个IP的最大活跃实例数已达上限,请稍后重试。
503
POOL_EXHAUSTED
实例池无可用资源,请稍后重试。
404
INSTANCE_NOT_FOUND
实例不存在或已过期。
500
INTERNAL_ERROR
服务器意外错误。

Resources

相关资源