跳到正文
Navigation

管理 MySQL 二进制日志(开启/关闭/查看/清理)

POST
https://your-panel.example.com:8888/database

管理 MySQL 二进制日志。

Request body application/x-www-form-urlencoded required

  • request_time
    string
    required

    Unix 时间戳。

  • request_token
    string
    required

    按 API 概览生成的签名。

  • action
    string
    required

    固定值 BinLog

Returns

default

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

JSON
  • status
    optional
    boolean

    请求结果,true 表示成功

  • msg
    optional
    string

    提示信息

各操作详细说明

BinLog管理 MySQL 二进制日志(开启/关闭/查看/清理)

BinLog / GetMySQLBinlogs / ClearMySQLBinlog

管理 MySQL 二进制日志。

  • 路由:POST /database

BinLog

开启或关闭二进制日志。

输入参数

参数名称 必选 类型 描述
action 是 String 固定值 BinLog

响应

输出参数

参数名称 类型 描述
status Boolean 请求结果,true 表示成功
msg String 提示信息
{"status": true, "msg": "开启二进制日志成功!", "data": {"binlog_status": true}}

GetMySQLBinlogs

获取二进制日志文件列表及大小。

响应

{"status": true, "msg": "ok", "data": [
    {"name": "mysql-bin.000001", "path": "/www/server/data/mysql-bin.000001", "size": 177}
]}

ClearMySQLBinlog

清理指定天数前的二进制日志。

输入参数

参数名称 必选 类型 描述
action 是 String 固定值 ClearMySQLBinlog
days 是 Integer 保留天数

响应

{"status": true, "msg": "清理完成!"}

Type to search…

↑↓ navigate↵ selectEsc close