MySQL/Postgres Config Auditor
Your database config decides who can log in without a password, which networks can reach the server, and whether a crash loses committed transactions. Read it before an attacker does.
A database config audit is a static review of a my.cnf or postgresql.conf file — its authentication, network, logging and durability settings — checked line by line against known-good practice, without running the server. Paste yours here and this auditor reads it in your browser — never uploaded — and flags skip-grant-tables, a bind-address of 0.0.0.0, local-infile on, ssl off, weak password hashing, wal_level minimal, autovacuum off and undersized buffer settings, with a 0–100 score. The companion article MySQL/Postgres config audit guide explains each check. Also see the Slow Query Log Analyzer and the Apache Config Auditor.
Last updated:
1. Audit a config
Results
🔒 The audit runs entirely in your browser: the config is never uploaded, never stored, and never sent anywhere. A config names data directories, file paths and access rules — that is exactly why it stays on your machine.
What a database config is
MySQL and PostgreSQL store their settings in different shapes. A MySQL config (my.cnf or my.ini) is grouped into sections — [mysqld] for the server, [client] for client defaults — with one key=value setting per line; # and ; start comments, and !include lines pull in other files. A PostgreSQL config (postgresql.conf) is flat: one key = value per line, values optionally quoted, # comments, and include lines that pull in other files.
The two dialects share the same four concerns, under different names: who may connect (bind-address / listen_addresses, authentication plugins / password_encryption), whether traffic is encrypted (ssl / require_secure_transport), what gets logged (general_log / log_statement, slow-query logging), and what survives a crash (innodb_flush_log_at_trx_commit / wal_level, sync_binlog / archive_mode). The auditor reads both shapes with the same rules for scoring.
Durability is a trade-off, not a switch: innodb_flush_log_at_trx_commit = 0 and sync_binlog = 0 make MySQL fast by risking committed transactions, while wal_level = minimal and archive_mode = off make Postgres fast by giving up replication and point-in-time recovery. The auditor flags the risky end of each trade-off and tells you the durable value.
Two things the auditor deliberately does not follow: !include and include lines are noted, not followed — audit each included file separately, because a clean main file can include a broken one — and the files around the config are out of scope: pg_hba.conf (Postgres client authentication) and the MySQL user grants are separate files the auditor never reads.
What this auditor does — and what it does not
It parses the config in your browser — MySQL sections or Postgres flat key=value, comments, quoted strings and include lines — detects the dialect automatically (a [mysqld] section or datadir/innodb_ keys mean MySQL; shared_buffers, wal_level or listen_addresses mean Postgres), and runs 50 rules over the settings: authentication, network exposure, TLS, password hashing, logging, binary/WAL archiving, durability, memory sizing, timeouts and character sets. Scoring starts at 100; each error deducts 10 (capped at 50), each warning 4 (capped at 28), each info 1 (capped at 10). Bands: 90+ Excellent, 70–89 Good, 50–69 Needs work, below 50 Poor.
It does not run the server, follow include lines, or read the running values: it reads exactly the text you give it. It cannot see total RAM, so buffer-pool and shared_buffers findings say “likely undersized” rather than “too small”. It cannot see the running values (SHOW VARIABLES / SHOW config), user privileges, replication state, or pg_hba.conf. A finding is a pattern, not a verdict — a huge max_connections may be exactly what a pooled setup needs. Read each finding with its evidence and decide with your context.
The broken demo is a small MySQL config built to trip the rules on purpose — skip-grant-tables, a bind-address of 0.0.0.0, local-infile on, no TLS, no binary logging and the weakest durability settings — and scores below 50 (Poor), with findings across all three severities. The hardened demo is the same shape with every finding fixed, and scores 100.
Be honest about what a static audit cannot see
This audit reads text. It cannot see the values the server is actually running with — a config file on disk and the running server can disagree after a missed restart — nor total RAM, replication lag, user privileges, or the client-authentication rules in pg_hba.conf. It also cannot see files pulled in by include lines: audit those separately, because a clean main file can include a broken one.
And a high score is not a safe database. The rules encode widely agreed practice — the MySQL 8.0 Reference Manual, the PostgreSQL documentation, and the CIS benchmarks — but they are a checklist, not a penetration test. “No findings” means no risky pattern was found in this text — not that the database behind it is secure.
Key facts
| skip-grant-tables | A MySQL startup option that disables all authentication: anyone who can connect has full root privileges. It exists for emergency password recovery and must never stay in a running config. |
| bind-address | The MySQL setting that picks which network interface the server listens on. 127.0.0.1 means local clients only; 0.0.0.0 (or *) means every interface, including the public internet if the host is exposed. |
| local-infile | The MySQL setting that lets a client ask the server to read a file from the client machine (LOAD DATA LOCAL). On, it turns a SQL injection into an arbitrary file read. |
| innodb_flush_log_at_trx_commit | Controls how often InnoDB flushes the transaction log to disk: 1 flushes on every commit (durable), 2 flushes once a second (a power loss can lose transactions), 0 flushes once a second and can lose up to a second of commits. |
| wal_level | The PostgreSQL setting that decides how much is written to the write-ahead log: minimal writes the least but allows no replication or point-in-time recovery; replica enables standby servers; logical adds logical decoding. |
| shared_buffers | PostgreSQL’s main memory cache for table and index data. The usual guidance is about 25% of server RAM; far below that, the server re-reads data from disk far more often than it needs to. |
| pg_hba.conf | PostgreSQL’s separate client-authentication file: it decides which users may connect from which hosts with which method (trust, md5, scram-sha-256, cert). It is a separate file the auditor does not read — a clean postgresql.conf does not mean open access is safe. |
| Format reference | MySQL 8.0 Reference Manual — Server System Variables · PostgreSQL Documentation — Server Configuration |
Frequently asked questions
Why does the audit run in my browser instead of on a server?
Because a config can name things you do not publish: data directories, file paths, log locations, internal hostnames. Sending that to a server to audit it would create the exact exposure the audit is meant to catch. Parsing it locally means the config never leaves your machine.
My config has findings — is my database unsafe?
Not necessarily. A finding is a pattern that matched, and some matches are intended: a large max_connections on a pooled setup, or wal_level minimal on a throwaway dev database. Start with the errors — skip-grant-tables, ssl off, local-infile on, autovacuum off, innodb_flush_log_at_trx_commit 0 — then the warnings, and treat the infos as a checklist of defaults worth setting explicitly.
MySQL or Postgres — how does one tool audit both?
The dialect toggle picks the parser: MySQL reads [section] headers with key=value lines, Postgres reads flat key = value lines with quoted strings. Auto-detect looks at the content — a [mysqld] section or datadir / innodb_ keys mean MySQL; shared_buffers, wal_level or listen_addresses mean Postgres. Each rule only fires for its own dialect, so a Postgres config is never judged by MySQL rules.