Path: API › 数据库管理

`POST /database`

获取 MySQL 慢查询日志的完整文本内容。

## Request body

_Required._

- `action68.request_time` (string, required) — Unix 时间戳。
- `action68.request_token` (string, required) — 按 API 概览生成的签名。
- `action68.action` (string, required) — 具体操作名称。
  - one of `"GetSlowLogs"`

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "action": "GetSlowLogs"
}
```

## Code samples

### cURL（填写面板地址与签名）

```curl
curl --request POST \
  --url "https://your-panel.example.com:8888/database" \
  --header "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "request_time=<Unix时间戳>" \
  --data-urlencode "request_token=<按 API 概览生成的签名>" \
  --data-urlencode "action=GetSlowLogs"
```

## Responses

### default

接口响应，业务状态见下方详细说明。

#### Example

```json
{
  "status": true,
  "msg": "/www/server/mysql/bin/mysqld, Version: 5.7.44-log (Source distribution).\nstarted with: Tcp port: 3306  Unix socket: /tmp/mysql.sock\n..."
}
```

- `action68.response.default.status` (boolean, optional) — `true` 获取成功
- `action68.response.default.msg` (string, optional) — 慢查询日志完整文本，开头包含 MySQL 版本和启动参数


## GetSlowLogs

获取 MySQL 慢查询日志的完整文本内容。

- **路由**：`POST /database`
- **action**：`GetSlowLogs`

## 输入参数

| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| action | 是 | String | 固定值 `GetSlowLogs` |

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| status | Boolean | `true` 获取成功 |
| msg | String | 慢查询日志完整文本，开头包含 MySQL 版本和启动参数 |

## 示例

```json
{
    "status": true,
    "msg": "/www/server/mysql/bin/mysqld, Version: 5.7.44-log (Source distribution).\nstarted with: Tcp port: 3306  Unix socket: /tmp/mysql.sock\n..."
}
```

