All Integrations
Databasesmysqld-exporter + Performance Schema

MySQL Integration

Slow query analysis, InnoDB buffer pool monitoring, replica lag tracking, and connection pool health for MySQL and MariaDB. Correlate database performance with application traces.

Setup

How It Works

01

Enable Performance Schema

Add performance_schema=ON to your my.cnf. TigerOps uses Performance Schema digest tables for per-query statistics without the overhead of the slow query log.

02

Create a Monitoring User

Grant the TigerOps user PROCESS, REPLICATION CLIENT, SELECT on performance_schema.*, and SELECT on information_schema.*. No access to application tables is required.

03

Deploy mysqld-exporter

Run the TigerOps mysqld-exporter. It connects via the MySQL protocol and scrapes InnoDB status, replication status, Performance Schema, and global status variables.

04

Correlate Queries with Traces

TigerOps links MySQL slow queries from Performance Schema to application traces, showing which service endpoints trigger the most expensive database operations.

Capabilities

What You Get Out of the Box

Slow Query Analysis

Per-query normalized digest statistics from Performance Schema: execution count, total latency, rows examined, and rows sent. Rank queries by total time impact.

InnoDB Buffer Pool Metrics

Buffer pool hit rate, dirty pages, read requests vs disk reads, and page flushing rates. TigerOps alerts when buffer pool efficiency drops below your SLO.

Replica Lag Monitoring

Seconds_Behind_Source tracking for all replicas with historical trend analysis. TigerOps alerts when replica lag exceeds your RPO threshold and identifies the cause.

Connection Pool Health

Active connections, idle connections, aborted connections, and max_connections utilization. TigerOps fires predictive alerts before connection exhaustion occurs.

Table Lock & Wait Analysis

Table lock wait count and time from Performance Schema. Identify which tables cause the most contention and which queries are blocked waiting for locks.

Binary Log & Disk Metrics

Binary log size, event write rates, and disk utilization per data directory. TigerOps warns before binlog accumulation causes disk pressure on the primary.

Configuration

my.cnf Performance Schema Config

Enable Performance Schema and configure MySQL for TigerOps monitoring.

my.cnf
# my.cnf — Enable Performance Schema for TigerOps
[mysqld]
performance_schema = ON
performance_schema_instrument = 'statement/%=ON'
performance_schema_instrument = 'wait/lock/table/sql/handler=ON'
performance_schema_consumer_events_statements_history_long = ON
performance_schema_consumer_statements_digest = ON

# Slow query log (supplement to Performance Schema)
slow_query_log = ON
slow_query_log_file = /var/log/mysql/slow.log
long_query_time = 1
log_queries_not_using_indexes = ON

# Binary logging for replication monitoring
log_bin = /var/log/mysql/mysql-bin.log
binlog_format = ROW
expire_logs_days = 7

---
-- Create TigerOps monitoring user
CREATE USER 'tigerops_monitor'@'%' IDENTIFIED BY 'your-secure-password';

GRANT PROCESS, REPLICATION CLIENT ON *.* TO 'tigerops_monitor'@'%';
GRANT SELECT ON performance_schema.* TO 'tigerops_monitor'@'%';
GRANT SELECT ON information_schema.* TO 'tigerops_monitor'@'%';
GRANT SELECT ON mysql.user TO 'tigerops_monitor'@'%';

FLUSH PRIVILEGES;

---
# mysqld-exporter environment (.env)
DATA_SOURCE_NAME="tigerops_monitor:password@tcp(mysql:3306)/"
TIGEROPS_ENDPOINT="https://ingest.atatus.net/api/v1/write"
TIGEROPS_API_KEY="${TIGEROPS_API_KEY}"
# Enable all collector modules
COLLECT_PERF_SCHEMA_TABLEIOWAITS=true
COLLECT_PERF_SCHEMA_INDEXIOWAITS=true
COLLECT_PERF_SCHEMA_TABLELOCKS=true
COLLECT_PERF_SCHEMA_EVENTSSTATEMENTS=true
COLLECT_SLAVE_STATUS=true
COLLECT_INNODB_METRICS=true
FAQ

Common Questions

Does TigerOps support Amazon RDS for MySQL and Aurora MySQL?

Yes. TigerOps connects to RDS and Aurora MySQL using the standard MySQL protocol with the monitoring user. For Enhanced Monitoring metrics (OS-level), TigerOps also ingests the RDS Enhanced Monitoring CloudWatch namespace.

Is Performance Schema safe to enable in production?

Yes. The overhead of Performance Schema in MySQL 5.7+ is minimal (typically under 5% CPU). TigerOps uses the events_statements_summary_by_digest table which is the lowest-overhead collection method. The slow query log is optional and used only as a fallback.

Can TigerOps monitor MySQL Group Replication and InnoDB Cluster?

Yes. TigerOps monitors Group Replication member state, view changes, and transaction certification queue. For InnoDB Cluster, it adds MySQL Router connection metrics and cluster topology health.

How does TigerOps handle query normalization across different ORM frameworks?

TigerOps uses MySQL Performance Schema's built-in digest normalization, which strips literals and parameters from queries. This means Hibernate, SQLAlchemy, and ActiveRecord queries are automatically grouped by pattern regardless of parameter values.

What is the minimum MySQL version TigerOps supports?

TigerOps requires MySQL 5.7.6+ for full Performance Schema support. MySQL 8.x is fully supported including the new replication channels and InnoDB parallel read/write metrics. MariaDB 10.3+ is also compatible via the same exporter.

Get Started

Find Your Slowest MySQL Queries in Minutes

InnoDB metrics, replica lag, and AI query analysis. No slow query log digging required.