Skip to content

MySQL health check.

Check your MySQL database in two minutes without sharing a password. Run one read-only query on system views and paste the output here. The page checks InnoDB buffer pool hit ratio, tables without a primary key, unused indexes, table fragmentation and stuck queries — all inside your browser.

Run this query on your database

It reads only information_schema and performance_schema (MySQL 8.0+), never touches user rows, and sends nothing over the network.

mysql-health.sql
-- DataRunner · MySQL health check (read-only, MySQL 8.0+)SELECT JSON_OBJECT(  'v', 1,  'engine', 'mysql',  'version', VERSION(),  'database', DATABASE(),  'size_bytes', (    SELECT COALESCE(SUM(data_length + index_length), 0)    FROM information_schema.tables    WHERE table_schema = DATABASE()  ),  'max_connections', @@max_connections,  'uptime_seconds', (    SELECT CAST(VARIABLE_VALUE AS UNSIGNED)    FROM performance_schema.global_status    WHERE VARIABLE_NAME = 'Uptime'  ),  'buffer_pool_hit_pct', (    SELECT ROUND(      100.0 * (1 - COALESCE(r.val, 0) / NULLIF(COALESCE(rr.val, 0), 0)),      2    )    FROM (SELECT CAST(VARIABLE_VALUE AS DECIMAL(20,2)) AS val FROM performance_schema.global_status WHERE VARIABLE_NAME = 'Innodb_buffer_pool_reads') r,         (SELECT CAST(VARIABLE_VALUE AS DECIMAL(20,2)) AS val FROM performance_schema.global_status WHERE VARIABLE_NAME = 'Innodb_buffer_pool_read_requests') rr  ),  'no_primary_key', COALESCE((    SELECT JSON_ARRAYAGG(JSON_OBJECT('name', t.table_name, 'rows', t.table_rows))    FROM (      SELECT t.table_name, t.table_rows      FROM information_schema.tables t      LEFT JOIN information_schema.table_constraints tc        ON tc.table_schema = t.table_schema        AND tc.table_name = t.table_name        AND tc.constraint_type = 'PRIMARY KEY'      WHERE t.table_schema = DATABASE()        AND t.table_type = 'BASE TABLE'        AND tc.constraint_name IS NULL      ORDER BY t.table_rows DESC      LIMIT 10    ) t  ), JSON_ARRAY()),  'fragmented_tables', COALESCE((    SELECT JSON_ARRAYAGG(JSON_OBJECT('name', t.table_name, 'free_bytes', t.data_free, 'total_bytes', t.total_bytes))    FROM (      SELECT table_name, data_free, (data_length + index_length + data_free) AS total_bytes      FROM information_schema.tables      WHERE table_schema = DATABASE()        AND table_type = 'BASE TABLE'        AND data_free > 10485760      ORDER BY data_free DESC      LIMIT 10    ) t  ), JSON_ARRAY()),  'unused_indexes', COALESCE((    SELECT JSON_ARRAYAGG(JSON_OBJECT('name', u.index_name, 'table', u.object_name))    FROM (      SELECT object_name, index_name      FROM performance_schema.table_io_waits_summary_by_index_usage      WHERE object_schema = DATABASE()        AND index_name IS NOT NULL        AND index_name <> 'PRIMARY'        AND count_star = 0      ORDER BY object_name, index_name      LIMIT 10    ) u  ), JSON_ARRAY()),  'long_queries', COALESCE((    SELECT JSON_ARRAYAGG(JSON_OBJECT('id', p.id, 'user', p.user, 'state', p.state, 'seconds', p.time))    FROM (      SELECT id, user, state, time      FROM information_schema.processlist      WHERE db = DATABASE()        AND command <> 'Sleep'        AND time > 60        AND id <> CONNECTION_ID()      ORDER BY time DESC      LIMIT 10    ) p  ), JSON_ARRAY()),  'largest_tables', COALESCE((    SELECT JSON_ARRAYAGG(JSON_OBJECT('name', t.table_name, 'bytes', t.bytes))    FROM (      SELECT table_name, (data_length + index_length) AS bytes      FROM information_schema.tables      WHERE table_schema = DATABASE()        AND table_type = 'BASE TABLE'      ORDER BY (data_length + index_length) DESC      LIMIT 5    ) t  ), JSON_ARRAY())) AS datarunner_mysql_health;

From a terminal, save the query to a file and run: mysql -N -B "$DB_NAME" < mysql-health.sql

Paste the result

The analysis happens in this browser. The result never leaves it.

Questions

Does it work on RDS, Aurora MySQL, and Cloud SQL?
Yes, on any MySQL 8.0+ instance with performance_schema enabled. Managed users without PROCESS privilege may only see their own threads in PROCESSLIST.
Why do tables without a primary key matter in MySQL?
InnoDB falls back to an internal 6-byte hidden key and row-based replication slows down dramatically on tables without an explicit PRIMARY KEY.
Does any database data leave my browser?
No. The query reads only catalog metadata and counters, and the analyzer runs entirely in client-side JavaScript.

Watch MySQL every week.

DataRunner schedules these checks and alerts you by email, Slack, Telegram or WhatsApp when buffer pool hit ratio drops or queries stall. Free plan needs no card.