Skip to content

Database security

Database Security Audit Fixes

MySQL, PostgreSQL, MongoDB and Redis - access, exposure and encryption.

These are the fixes for a database security audit: which accounts exist and what they can do, which interfaces the engine listens on, whether traffic is encrypted, and where the credentials are stored.

CtrlOpsDatabase fixes37 CHECKS
Checks documented
37
Audits in this category
6
Need root or sudo
29
Rated high severity
19

For what these audits cover rather than how to fix them, see the Database security checklist, or how the CtrlOps Security Audit runs.

By audit

6 audits, 37 checks

Grouped by the 6 audits they belong to. Authentication and network isolation come first, because together they decide whether the database is reachable by anyone at all.

How much of this is serious?

19 high, 15 medium and 3 low severity checks
  1. 01AuthenticationPasswordless access, anonymous users, remote root and auth methods8 fixes · 8 need root7 high, 1 medium and 0 low severity checks
  2. 02Configuration & HardeningService users, installer defaults, patches, log placement and backups7 fixes · 5 need root4 high, 1 medium and 2 low severity checks
  3. 03Network IsolationEngine inventory, bindings, exposed ports and web admin tools7 fixes · 4 need root5 high, 1 medium and 1 low severity checks
  4. 04Least-Privilege PermissionsWildcard hosts, FILE privilege, admin accounts and allowed hosts6 fixes · 6 need root0 high, 6 medium and 0 low severity checks
  5. 05Transport EncryptionTLS enforcement and server certificates for client connections5 fixes · 5 need root0 high, 5 medium and 0 low severity checks
  6. 06Credential StorageConfig files in the web root, config permissions, exposed .git and client credential files4 fixes · 1 need root3 high, 1 medium and 0 low severity checks

Fix these first

The highest-severity findings in Database

Ordered by the impact class the audit script assigns, then by the order the audit runs them.

What these fixes cover

  • Root and anonymous accounts, blank passwords and the authentication method in use
  • Listening interfaces, exposed ports and web-based admin panels
  • Over-broad grants: wildcard hosts, FILE privilege, superusers and admin accounts
  • TLS enforcement and certificates, plus where config and backup credentials live on disk

What they do not

  • Schema design, query performance or index health. These checks read security configuration only.
  • Databases running inside containers. The probes look for host engines; audit those with the Docker checks or exec into the container.
  • Managed database services. There is no config file to read on RDS, Cloud SQL or Atlas.

Keep going

The other three platforms

Most hosts run more than one of these. The split shows how much of each platform the audit rates as high severity.

FAQ

Database fix questions

Can't find your answer? Join Discord

  • Two reasons dominate. Either no database engine was detected on the host, in which case there is genuinely nothing to audit, or the engine is present but the script could not authenticate to it. The checks require a working root socket login (mysql -N -e "SELECT 1" as root, or psql as the postgres user); without that, they report SKIP rather than guess. Containerised databases are not detected by these probes.

  • The checks themselves are read-only and safe on production. The fixes are not uniformly safe: changing bind-address, require_secure_transport or a pg_hba.conf auth method will drop existing connections or lock out clients that are not ready for it. Each page states what the change breaks. Test the new setting against a staging client before reloading production.

  • Yes. MariaDB is detected and audited by the MySQL checks throughout, and the pages call out the places where MariaDB behaves differently, most notably that it still exposes have_ssl where MySQL 8.4 removed it.

  • The network isolation findings matter less, though a private network is not a trust boundary once one host on it is compromised. The authentication, least-privilege and credential-storage findings matter just as much: they are what limits the damage after an application-level breach, which is how most database compromises actually begin.

Stop juggling tools. Start managing fleets.

PuTTY
Termius
MobaXterm
WinSCP
SecureCRT
Royal TS
Warp
CtrlOps14 tools left
Webmin
aaPanel
RunCloud
Dokploy
IP spreadsheet
bash (2)
sticky notes

One app. All your servers. No context switching. Free to start, free to leave.

Start instantly · No credit card · Cancel anytime

Your privacy preferences. We use product analytics to improve CtrlOps. Google Analytics cookies and live chat stay off until you allow them. Cookie policy