Database Access Audit Scripts (MySQL, PostgreSQL, SQL Server)
Read-only SQL audit scripts with Windows and Linux runners: database accounts and roles, admin rights, empty passwords, remote access, risky settings, encryption, backups, tables without keys and columns holding personal data (names only, no values).
Windows (.bat)Linux (.sh)macOS (.sh) USD 3.00 for all versions · read-only · 1 hour 30 minutes to download
Pay via M-Pesa, Airtel Money and local mobile money across East Africa, or by Visa / Mastercard. How to pay
| Script | Database Access Audit Scripts (MySQL, PostgreSQL, SQL Server) |
|---|---|
| Platform | MySQL/MariaDB, PostgreSQL, Microsoft SQL Server |
| Audit area | Applications and databases |
| Purpose | Reviews who can reach each database and with what rights, and whether the server settings meet good practice, using SELECT statements only. |
| Price | USD 3.00, all platform versions |
Prerequisites
- The database client: mysql, psql or sqlcmd (or SQL Server Management Studio)
- An audit login with read-only rights: MySQL SELECT on mysql.* and PROCESS; PostgreSQL pg_read_all_settings and pg_read_all_stats; SQL Server VIEW SERVER STATE and VIEW ANY DEFINITION
- Network access to the database server (run it from an admin workstation or the server itself)
What the script checks
- Accounts/logins/roles, locked, expired, last password change (no hashes)
- Empty passwords, logins without password policy, the sa login, anonymous and any-host accounts
- Admin and server-role members, risky server permissions, database-level grants and grants to PUBLIC
- Security settings: TLS required, local_infile, xp_cmdshell, CLR, pg_hba trust/md5 rules, logging
- Database owners, encryption, recovery model, last full backup (SQL Server)
- Tables without a primary key; column NAMES that suggest personal or secret data (no values are read)
- Current connections and whether they are encrypted
- The full script for Windows, Linux, macOS
- How to open the correct console, and the permissions it needs (least privilege)
- Step-by-step instructions
- The expected output and how to interpret it
Also included in the zip as README-how-to-run.txt. Follow the audit process guide for scope, authorisation and evidence.
Safe by design
- Read-only: installs nothing and changes no settings.
- Sends nothing to our servers; results stay on your computer.
- Secrets are masked and password hashes are never printed.
- Plain text: open it in any editor and check every line before running it.
Also known as: database audit script, mysql user audit sql, postgresql role audit, sql server login audit script, database access review, database security audit, pg_hba review, xp_cmdshell check.
Templates to use with this script
More audit scripts
Questions
Is the database access audit scripts safe to run?
Yes. It only reads information and writes its results next to itself. It installs nothing, changes no settings and sends nothing to our servers. Secrets it finds are masked, and password hashes are never printed. It is plain text: open it in any editor to check every line before you run it.
How do I get the script?
Click "Get script", pay USD 3.00 through APOPS Pay (M-Pesa, Airtel Money, local mobile money across East Africa, or Visa / Mastercard payment), then download the Windows, Linux, macOS versions. One payment covers every operating system.
How long can I download it?
For 1 hour 30 minutes after payment, as often as you like. You are told this before you pay. Keep the zip: the script itself never expires.
Do I need administrator rights?
An audit login with read-only rights: MySQL SELECT on mysql.* and PROCESS; PostgreSQL pg_read_all_settings and pg_read_all_stats; SQL Server VIEW SERVER STATE and VIEW ANY DEFINITION
What do I get after paying?
The full script for each platform, how to open the correct console, the permissions it needs, step-by-step instructions, the expected output and how to read the results. They are shown on this page and included as a README in the zip.