数据库 MySQL
- 作者仓库星标 613
- 作者仓库 incidentfox
MySQL Database
Authentication
IMPORTANT: Credentials are injected automatically by a proxy layer. Do NOT check for MYSQL_PASSWORD in environment variables - it won't be visible to you. Just run the scripts directly; authentication is handled transparently.
Configuration environment variables you CAN check (non-secret):
MYSQL_HOST- Database hostMYSQL_PORT- Database port (default: 3306)MYSQL_DATABASE- Database name
MANDATORY: Schema-First Investigation
Understand the schema before running queries.
LIST TABLES → DESCRIBE TABLE → EXECUTE QUERY → CHECK HEALTH
Available Scripts
All scripts are in .claude/skills/database-mysql/scripts/
list_tables.py - List Tables (START HERE)
python .claude/skills/database-mysql/scripts/list_tables.py [--database DB]
describe_table.py - Table Schema Details
python .claude/skills/database-mysql/scripts/describe_table.py --table TABLE_NAME [--database DB]
execute_query.py - Run SQL Queries
python .claude/skills/database-mysql/scripts/execute_query.py --query "SELECT * FROM users LIMIT 10" [--limit 100]
show_processlist.py - Active Connections
python .claude/skills/database-mysql/scripts/show_processlist.py [--full]
show_replica_status.py - Replication Health
python .claude/skills/database-mysql/scripts/show_replica_status.py
show_engine_status.py - InnoDB Engine Status
python .claude/skills/database-mysql/scripts/show_engine_status.py [--engine innodb]
get_table_locks.py - Lock Contention
python .claude/skills/database-mysql/scripts/get_table_locks.py
Investigation Workflow
Slow Query Investigation
1. show_processlist.py --full (find active/long queries)
2. show_engine_status.py (check InnoDB lock waits, deadlocks)
3. get_table_locks.py (find lock contention)
Replication Lag
1. show_replica_status.py (check Seconds_Behind_Master)
2. show_processlist.py (check for blocking queries)- 流狐分类
- 数据
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @incidentfox · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- Python
- 检测到的文件与系统行为
-
- 只读
- Shell 执行
- 读取环境变量
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 MANDATORY: Schema-First Investigation
Understand the schema before running queries.
showprocesslist.py - Active Connections
showprocesslist.py - Active Connections
# MySQL Database
## Authentication
**IMPORTANT**: Credentials are injected automatically by a proxy layer. Do NOT check for `MYSQL_PASSWORD` in environment variables - it won't be visible to you. Just run the scripts directly; authentication is handled transparently.
Configuration environment variables you CAN check (non-secret):
- `MYSQL_HOST` - Database host
- `MYSQL_PORT` - Database port (default: 3306)
- `MYSQL_DATABASE` - Database name
---
## MANDATORY: Schema-First Investigation
**Understand the schema before running queries.**
```
LIST TABLES → DESCRIBE TABLE → EXECUTE QUERY → CHECK HEALTH
```
## Available Scripts
All scripts are in `.claude/skills/database-mysql/scripts/`
### list_tables.py - List Tables (START HERE)
```bash
python .claude/skills/database-mysql/scripts/list_tables.py [--database DB]
```
### describe_table.py - Table Schema Details
```bash
python .claude/skills/database-mysql/scripts/describe_table.py --table TABLE_NAME [--database DB]
```
### execute_query.py - Run SQL Queries
```bash
python .claude/skills/database-mysql/scripts/execute_query.py --query "SELECT * FROM users LIMIT 10" [--limit 100]
```
### show_processlist.py - Active Connections
```bash
python .claude/skills/database-mysql/scripts/show_processlist.py [--full]
```
### show_replica_status.py - Replication Health
```bash
python .claude/skills/database-mysql/scripts/show_replica_status.py
```
### show_engine_status.py - InnoDB Engine Status
```bash
python .claude/skills/database-mysql/scripts/show_engine_status.py [--engine innodb]
```
### get_table_locks.py - Lock Contention
```bash
python .claude/skills/database-mysql/scripts/get_table_locks.py
```
---
## Investigation Workflow
### Slow Query Investigation
```
… 证据边界与执行链路
作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Authentication → MANDATORY: Schema-First Investigation → Available Scripts → listtables.py - List Tables (START HERE) → describetable.py - Table Schema Details → executequery.py - Run SQL Queries
要点 -> IMPORTANT · Understand the schema before running queries. · IMPORTANT: Credentials are injected automatically by a proxy layer.
文件/命令 -> MYSQLPASSWORD · MYSQLHOST · MYSQLPORT · MYSQLDATABASE · .claude/skills/database-mysql/scripts/
内容 SHA-256 -> 9e1d5e4286bd
方法与流程
适用与边界
原文中的明确线索
MYSQLPASSWORD、MYSQLHOST、MYSQLPORT、MYSQLDATABASE、.claude/skills/database-mysql/scripts/