跳到主要内容
版本:latest

BinLog / GetMySQLBinlogs / ClearMySQLBinlog

管理 MySQL 二进制日志。

  • 路由POST /database

BinLog

开启或关闭二进制日志。

输入参数

参数名称必选类型描述
actionString固定值 BinLog

响应

输出参数

参数名称类型描述
statusBoolean请求结果,true 表示成功
msgString提示信息
{"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

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

输入参数

参数名称必选类型描述
actionString固定值 ClearMySQLBinlog
daysInteger保留天数

响应

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