MySQL analysis and monitoring CLI. Run one-time checks or continuous collection — all read-only, never writes to your database.
# Homebrew (macOS / Linux)
brew install scaledb-io/tap/scaledb
# Go
go install github.com/scaledb-io/scaledb/cmd/scaledb@latest
# Binary
# Download from https://github.com/scaledb-io/scaledb/releasesCollect performance data from MySQL/Aurora to Parquet files — queryable with DuckDB, Athena, pandas, or any Parquet-compatible tool.
cat > scaledb.yaml <<EOF
cluster: my-cluster.abc123.us-east-1.rds.amazonaws.com
user: scout
password_from: env:MYSQL_PASSWORD
output:
type: local
path: ./scaledb-data/
collect:
interval: 60s
schemas: true
EOF
export MYSQL_PASSWORD=<password>
scaledb collect --config scaledb.yamlQuery collected data with DuckDB:
duckdb -c "SELECT digest_text[:80], exec_count, sum_timer_wait/1e12 as wait_sec
FROM 'scaledb-data/query-digests/**/*.parquet'
ORDER BY sum_timer_wait DESC LIMIT 10"See docs/collect.md for full configuration, query examples, and schema reference.
# Check MySQL variables against 72 best-practice rules
scaledb check variables --host 127.0.0.1 --user root --password secret
# Find duplicate and redundant indexes
scaledb check indexes --host 127.0.0.1 --user root --password secret
# Instance summary (version, buffer pool, InnoDB stats, replication)
scaledb check summary --host 127.0.0.1 --user root --password secret
# JSON output
scaledb check variables --host 127.0.0.1 --user root --password secret --format json
# Filter by category
scaledb check variables --host 127.0.0.1 --user root --password secret --category innodbinnodb, replication, connections, memory, security, performance_schema, general
# Reads host, port, user, password from the [client] section
scaledb check variables --defaults-file ~/.my.cnf
# Explicit flags override defaults file values
scaledb check variables --defaults-file ~/.my.cnf --category innodbexport MYSQL_PWD=secret
scaledb check variables --host 127.0.0.1 --user root --password-env MYSQL_PWD| Tool | What it does |
|---|---|
| Variable Advisor | 72 rules across 7 categories (InnoDB, replication, connections, memory, security, performance_schema, general). Auto-detects Aurora and skips inapplicable rules. |
| Duplicate Key Checker | Finds indexes that are left-prefixes of other indexes. Generates DROP INDEX statements. |
| MySQL Summary | Version, uptime, QPS, buffer pool hit ratio, InnoDB row ops, connections, schema sizes, replication lag. |
See docs/rules.md for the full rule catalog with descriptions and severity levels.
| Doc | What's in it |
|---|---|
| docs/collect.md | Collect command — config, data layout, DuckDB/Python query examples, Parquet schema reference |
| docs/rules.md | Variable advisor rule catalog (72 rules, 7 categories) |
The analysis package is importable:
import "github.com/scaledb-io/scaledb/pkg/analyze"
result, err := analyze.CheckVariables(ctx, db, analyze.CheckVariablesOptions{})
findings, err := analyze.CheckDuplicateKeys(ctx, db)
summary, err := analyze.CollectSummary(ctx, db)- MySQL 5.7+ or 8.0+ (including Aurora MySQL)
- A user with
SELECToninformation_schemaandperformance_schema - No special configuration needed — works with default MySQL grants
Apache 2.0 — see LICENSE.