Reconnecting
Restoring connection…
Reconnecting
Restoring connection…
MySQL / MariaDB operations
v0.1.4Read-only MySQL diagnostics plus narrow operator actions for killing queries, flushing logs, and analyzing tables. Authenticates via ~/.my.cnf or MYSQL_PWD env var on the runner host — never via per-call credentials over the wire.
mysql
Install
emisar pack install
fetches this pack, re-validates it, and verifies its content hash against the
--hash
below — the exact bytes this page was rendered against, so a tampered copy is
rejected — before copying it into the runner's packs dir. The command reloads a
running daemon itself; no manual restart.
sudo emisar pack install mysql --hash sha256:8f542b9d4cd9f2059cbf64e856a6b63a2db75e1f7eb1148bd5da4d5cf3da57ca
Actions 25 total
View on GitHub-
mysql.analyze_table exec medium
ANALYZE TABLE
Refreshes the optimizer statistics for one table. Per-table only; cannot wildcard.
View source on GitHub -
mysql.binlog_positions exec low
Binary log files
`SHOW BINARY LOGS` — every binlog file with its size. Use to plan binlog disk pressure.
View source on GitHub -
mysql.connections_summary exec low
Connection counts + cap
Show connected vs max_connections + breakdown by host. Use to check "are we close to connection exhaustion?"
View source on GitHub -
mysql.db_sizes exec low
Database sizes
Show per-database data + index size summary. Read-only.
View source on GitHub -
mysql.engines exec low
SHOW ENGINES
Lists available storage engines and which is default. Read-only.
View source on GitHub -
mysql.flush_logs exec medium
FLUSH LOGS
Closes and reopens all log files (general, slow, error, binary). Use after rotating with logrotate.
View source on GitHub -
mysql.flush_status exec medium
FLUSH STATUS
Resets the GLOBAL STATUS counters to zero. Use before a workload to get a clean rate measurement window.
View source on GitHub -
mysql.gtid_executed exec low
GTID executed set
`SELECT @@GLOBAL.gtid_executed` — every GTID this server has applied. Use to compare primary vs replica progress.
View source on GitHub -
mysql.index_unused exec low
Unused indexes
List indexes with zero reads since uptime — candidates for dropping (frees disk + speeds writes). Read-only.
View source on GitHub -
mysql.innodb_status exec low
SHOW ENGINE INNODB STATUS
Show full InnoDB engine status — buffer pool, latest deadlock detected, longest waiting transaction, undo space, log sequence number. The canonical "InnoDB is sick" diagnostic.
View source on GitHub -
mysql.kill_connection exec high
KILL (terminate connection)
Terminates one connection. Use to clean up a stuck/idle session. Client sees "lost connection" and must reconnect.
View source on GitHub -
mysql.kill_query exec high
KILL QUERY (cancel statement)
Cancels the currently-executing query on one connection. Connection survives — pair with `kill_connection` to terminate the session entirely.
View source on GitHub -
mysql.lock_waits exec low
Lock-wait graph
Joins performance_schema.data_lock_waits with data_locks to show who is blocking whom. Use before a kill_query — you want the blocker, not the victim.
View source on GitHub -
mysql.master_status exec low
SHOW MASTER STATUS
Show current binary log file, position, and GTID set on the primary. Read-only.
View source on GitHub -
mysql.open_tables exec low
SHOW OPEN TABLES
List tables currently in the table cache. Read-only.
View source on GitHub -
mysql.optimize_table exec high
OPTIMIZE TABLE
Rebuilds the table to reclaim space and re-sort the clustered index. **Holds an exclusive lock for the duration** on non-InnoDB engines; InnoDB tables get an online ALTER. Per-table only.
View source on GitHub -
mysql.processlist exec low
SHOW FULL PROCESSLIST
List every active connection with its current command, state, and full query. The first stop for "what is the DB doing?"
View source on GitHub -
mysql.replica_status exec low
SHOW REPLICA STATUS
Reads SHOW REPLICA STATUS (or SHOW SLAVE STATUS on old versions). Surfaces lag, last error, IO and SQL thread state, and binlog position. Returns 'not a replica' cleanly when this is a primary.
View source on GitHub -
mysql.slow_queries exec low
Top slow query digests
Reads performance_schema.events_statements_summary_by_digest — top N statement fingerprints by mean execution time. Requires performance_schema enabled.
View source on GitHub -
mysql.status exec low
SHOW GLOBAL STATUS (filtered)
Show global counters filtered by glob pattern. Default returns connection + thread counters.
View source on GitHub -
mysql.table_io_summary exec low
Top tables by IO wait
List top 30 tables ordered by total I/O wait time. Identifies tables driving disk pressure.
View source on GitHub -
mysql.table_sizes exec low
Top tables by total size
List top N tables ordered by (data + index) size in bytes. Read-only.
View source on GitHub -
mysql.uptime exec low
Uptime + version
Returns SELECT VERSION() and uptime from SHOW STATUS. Read-only.
View source on GitHub -
mysql.users_grants exec low
List users + grants summary
List user + host pairs from mysql.user. Doesn't dump grants (volume) — use for audit "who has accounts?"
View source on GitHub -
mysql.variables exec low
SHOW GLOBAL VARIABLES (filtered)
Show global variables filtered by glob pattern. Default returns InnoDB + buffer settings.
View source on GitHub