Free audit

View Audit Scope
MySQLCIS Benchmark hardening and encryption

MySQL Security Audit & CIS Benchmark Hardening

JusDB performs read-only MySQL security audits and CIS Benchmark hardening across Amazon RDS, Aurora, Google Cloud SQL, Azure, and self-managed clusters. Our database engineers review mysql.user privileges, caching_sha2_password authentication, TLS 1.3 transport, InnoDB keyring TDE encryption, and audit logging to help your MySQL estate align with PCI-DSS, HIPAA, SOC 2, and GDPR requirements.

The first 30-minute call covers your databases, current ownership, and required coverage. No production access is needed. Or request a free audit of one database instance.

  • NDA before access
  • Read-only by default
  • Written scope before work starts

MySQL security baseline by version

Select the environment you run

MySQL 8.4 LTS Security Defaults

Strongest baseline

MySQL 8.4 LTS disables mysql_native_password by default, enforces caching_sha2_password, removes weak SSL ciphers, and uses component-based keyring plugins (component_keyring_file / KMS).

Upgrading to 8.4 LTS requires migrating legacy mysql_native_password accounts first using dual-password rotation.

Plan an 8.0 to 8.4 LTS upgrade

Checked against the MySQL documentation and CIS Oracle MySQL Benchmark controls.

Controls audited
caching_sha2_password, TLS 1.3, keyring TDE, binlog encryption, audit log plugins, and least-privilege grants
Framework alignment
CIS MySQL Benchmark (Level 1 & 2) mapped to client PCI-DSS v4.0, HIPAA, SOC 2, ISO 27001, and GDPR controls
Response SLA
15 mins for a critical (P1) incident, 24/7. See details

Selected clients

  • Innoviti
  • Blitz
  • Freecharge
  • Nango
  • Recochain
  • Screen Facts
  • Nexora
  • WeCredit

When teams call us

Common MySQL security gaps we uncover and remediate

Most MySQL security findings come from five years of accumulated grants, legacy authentication plugins carried across upgrades, plaintext internal connections, and missing audit filters.

Common MySQL security gaps, what is usually happening, and where JusDB database engineers start
Finding / SignalWhat is usually happeningWhere we start
GRANT ALL ON *.*Application pools run with SUPER or blanket schema privilegesMicroservices share a single root-equivalent account or wildcard '%' host grant created years ago, allowing any SQL injection or leaked secret to drop tables or read every schema.Query mysql.user, mysql.db, and information_schema.user_privileges read-only, map active client IPs in performance_schema.hosts, and build schema-scoped SQL Roles.
mysql_native_passwordLegacy SHA-1 password hashes block 8.4 LTS upgrades and fail reviewsOlder accounts still authenticate with mysql_native_password, and teams hesitate to switch to caching_sha2_password for fear of breaking running application connection pools.List accounts by plugin in mysql.user, verify client driver compatibility, and use MySQL 8.0 dual passwords (RETAIN CURRENT PASSWORD) to rotate credentials without downtime.
Ssl_cipher: NULLPlaintext TCP connections transmit credentials and rows across the networkrequire_secure_transport is OFF, replication channels run with SOURCE_SSL=0, or older TLS versions remain allowed on the server listener.Inspect performance_schema.status_by_thread for Ssl_version and Ssl_cipher per session, enable TLS 1.3 on client pools first, then set require_secure_transport=ON.
ENCRYPTION='N'Tablespaces, redo logs, or binary logs sit unencrypted at restInnoDB file-per-table tablespaces lack AES-256 TDE, binlog_encryption is disabled, or a local keyring_file sits on the same filesystem as datadir.Audit information_schema.innodb_tablespaces, wire component_keyring_kms or HashiCorp Vault, enable innodb_redo_log_encrypt and binlog_encryption, and run online tablespace encryption.
No audit trailYou cannot prove who queried or altered sensitive schemas for an auditorNeither the Percona Audit Log Plugin nor MySQL Enterprise Audit is enabled, or an unfiltered general_log was turned off because it saturated disk I/O.Deploy audit_log_filter or the RDS MariaDB Audit Plugin with JSON rule filters targeting DDL, DCL (GRANT/REVOKE), failed logins, and sensitive tables, then stream to your SIEM.
Unencrypted backupsLogical dumps or XtraBackup archives sit in S3 or NFS without key separationBackup scripts stream mysqldump or xtrabackup output without AES-256 encryption, or store the encryption passphrase in plaintext inside the same cron script.Configure xtrabackup --encrypt=AES256 backed by KMS or Vault secrets, lock down bucket IAM policies, and verify decryption during a scheduled restore drill.

Audit and hardening scope

What does a MySQL security audit cover?

We inspect six technical control areas across your MySQL servers, replicas, backups, and cloud parameter groups, then deliver prioritized findings and staged remediation scripts.

  • Least-privilege grant and SQL Role engineering

    We replace shared administrative accounts and wildcard host grants with role-based access scoped to the exact DML permissions each service needs.

    • Full catalog audit of SUPER, SYSTEM_VARIABLES_ADMIN, and FILE grants
    • SQL Roles separating application DML, CI/CD schema migration, and read-only analytics

    mysql.user · mysql.role_edges · information_schema.user_privileges

  • Authentication and caching_sha2_password migration

    We move accounts off legacy mysql_native_password and enforce password validation, failed-login lockouts, and credential rotation policies.

    • Online credential rotation using MySQL dual passwords (RETAIN CURRENT PASSWORD)
    • FAILED_LOGIN_ATTEMPTS, PASSWORD_LOCK_TIME, and cloud IAM database authentication

    caching_sha2_password · validate_password · AWS RDS IAM / Cloud SQL IAM

    MySQL 8.0 to 8.4 LTS upgrades
  • TLS 1.3 in-transit and replication encryption

    We identify every unencrypted client and replica connection before turning on strict TLS enforcement so no application pool drops unexpectedly.

    • Per-connection TLS version and cipher inventory via Performance Schema
    • Enforced require_secure_transport=ON, tls_version='TLSv1.3', and SOURCE_SSL=1

    performance_schema.status_by_thread · require_secure_transport · mTLS

  • InnoDB TDE keyring and backup encryption

    We configure engine-level Transparent Data Encryption (TDE) with external key management and verify that redo logs, undo logs, binlogs, and backups are encrypted.

    • component_keyring_kms / Vault integration and online ALTER TABLE ENCRYPTION='Y'
    • innodb_redo_log_encrypt, innodb_undo_log_encrypt, binlog_encryption, and XtraBackup AES-256

    component_keyring_file · AWS KMS · HashiCorp Vault · Percona XtraBackup

  • Audit log plugin and SIEM event filtering

    We deploy low-overhead audit logging that captures administrative actions, privilege changes, and failed logins without logging every high-frequency SELECT.

    • Percona Audit Log Plugin (audit_log_filter), MySQL Enterprise Audit, or RDS Audit Plugin
    • Structured JSON log rotation and streaming to Splunk, Datadog, CloudWatch, or Elastic

    audit_log_filter · server_audit_events · CloudWatch Logs · SIEM

  • CIS MySQL Benchmark report and auditor evidence

    You receive a written, severity-ranked gap report mapped to CIS MySQL Benchmark Level 1 and Level 2 controls and your compliance framework requirements.

    • Control-by-control evidence queries, current state, and copy-paste remediation SQL
    • Control mapping matrix for your PCI-DSS v4.0, HIPAA, SOC 2, ISO 27001, and GDPR reviewers

    CIS MySQL 8.0 / 8.4 Benchmark · PCI-DSS v4.0 · HIPAA · SOC 2 · GDPR

    Cross-engine security audit services

CIS Benchmark and regulatory mapping

CIS MySQL Benchmark and regulatory control matrix

JusDB hardens client MySQL clusters to align with PCI-DSS, HIPAA, SOC 2, ISO 27001, and GDPR database requirements. Every finding in your report maps the internal MySQL check to the remediation script and your target framework.

CIS MySQL Benchmark control domains mapped to diagnostic checks, remediation actions, and client PCI-DSS, HIPAA, SOC 2, and GDPR alignment
Control domainRead-only MySQL checkHardening remediationClient framework alignment
Authentication & password lifecycle (CIS §7)Inspect `mysql.user` for `plugin = 'mysql_native_password'`, empty passwords, `password_expired`, `account_locked`, and `validate_password` policy settings.Migrate accounts to `caching_sha2_password` with `RETAIN CURRENT PASSWORD`, set `FAILED_LOGIN_ATTEMPTS 5` and `PASSWORD_LOCK_TIME 2`, and drop anonymous/orphan users.Helps align client authentication controls with PCI-DSS v4.0 Req 8.3, SOC 2 CC6.1, and HIPAA §164.312(d).
Network & in-transit encryption (CIS §8)Check `@@require_secure_transport`, `@@tls_version`, `@@bind_address`, `performance_schema.status_by_thread` (`Ssl_version`), and `replication_connection_configuration` (`SSL_ALLOWED`).Enforce `tls_version = 'TLSv1.2,TLSv1.3'` (or `TLSv1.3`), set `require_secure_transport = ON`, enable `SOURCE_SSL = 1` on replicas, and restrict VPC/firewall ingress.Helps align client transport protection with PCI-DSS v4.0 Req 4.2, HIPAA §164.312(e)(1), and GDPR Art. 32.
At-rest TDE, binlog & backup encryption (CIS §6)Query `information_schema.innodb_tablespaces` (`ENCRYPTION`), `@@default_table_encryption`, `@@innodb_redo_log_encrypt`, `@@innodb_undo_log_encrypt`, and `@@binlog_encryption`.Configure external KMS/Vault keyring component, enable `default_table_encryption=ON`, encrypt existing tablespaces, enable redo/undo/binlog encryption, and enforce `xtrabackup --encrypt=AES256`.Helps align client data-at-rest protection with PCI-DSS v4.0 Req 3.5, HIPAA §164.312(a)(2)(iv), SOC 2 CC6.7, and GDPR Art. 32.
Audit logging & tamper-evident telemetry (CIS §6.2)Verify `SELECT * FROM information_schema.plugins WHERE PLUGIN_NAME LIKE '%audit%'`, log rotation settings, and filter rules for DDL, DCL, and connection events.Install `audit_log_filter` (Percona) or MySQL Enterprise Audit / RDS Audit Plugin, filter out high-volume read noise, capture `CONNECTION`, `DDL`, and `DCL`, and stream JSON logs to SIEM.Helps align client audit trail evidence with PCI-DSS v4.0 Req 10.2, HIPAA §164.312(b), and SOC 2 CC7.2.
Least-privilege grants & server hardening (CIS §4 & §5)Audit `information_schema.user_privileges` and `mysql.global_grants` for `SUPER`, `FILE`, `GRANT OPTION`, `ALL PRIVILEGES`, wildcard `'%'` hosts, and `@@local_infile`.Revoke `SUPER` and administrative dynamic privileges from application users, replace wildcard grants with CIDR/subnet bounds, set `local_infile = OFF`, and enforce SQL Roles.Helps align client access-control boundaries with CIS MySQL Benchmark Level 1/2, PCI-DSS v4.0 Req 7.2, and SOC 2 CC6.3.

JusDB compliance status and SLA response times

JusDB's security practices are aligned with ISO 27001 and SOC 2 Type II, and JusDB is pursuing both certifications (see Terms, section 12). Read Terms, section 12.

24/7 support. SLA response times: P1 – 15 mins | P2 – 30 mins | P3 – 60 mins.

Response means an on-call engineer is working the incident, not an automated reply.

P1 · Critical15 mins

Production database down, primary unreachable, data corruption risk, or active failover event.

24/7

P2 · High30 mins

Severe latency spike, replication lag climbing rapidly, connection exhaustion, or degraded HA node.

24/7

P3 · Medium60 mins

Non-critical slow query regression, staging issue, backup warning, configuration question, or planned operational request.

24/7

Staged hardening progression

How we harden production MySQL without breaking application pools

Flipping require_secure_transport=ON or revoking grants blindly breaks production services. We profile live session attributes first, stage dual passwords, and cut over one control at a time.

Three stages from legacy privileges to CIS-hardened MySQL

Select a stage to see how authentication, transport encryption, and audit logging evolve safely.

Application connection pools and MySQL listener

Application pools connect over plaintext TCP (Ssl_cipher: NULL) using a shared admin account with mysql_native_password.

High compliance & breach exposure
  • Authentication & Grants

    app_user@'%' with ALL PRIVILEGES

    mysql_native_password · SUPER granted

  • Transport & Storage

    require_secure_transport=OFF

    Plaintext TCP · Unencrypted tablespaces

  • Audit Telemetry

    No audit plugin loaded

    Zero DDL / DCL / login trail

A common pre-audit baseline: microservices share a broad privilege account, legacy SHA-1 password hashes block MySQL 8.4 LTS upgrades, and no audit log records schema or privilege changes.

How a MySQL security audit and hardening engagement runs

Step through the five phases from mutual NDA to auditor-ready verification.

5 steps
NDA & scope

Mutual NDA and written audit scope agreed before access.

Representative deliverable

Read-only privilege audit queries, staged remediation, and rollback SQL

Every finding in your audit report includes the exact read-only query that proved the gap, the staged remediation commands, and the immediate rollback script.

Example finding from a pre-PCI-DSS v4.0 MySQL 8.0 security auditSample deliverable

Finding · CIS 4.4 / 7.1 / 8.2

11 application accounts hold wildcard host grants with SUPER and mysql_native_password over plaintext TCP

Inspection of mysql.user and performance_schema.status_by_thread showed 11 microservice accounts connecting as '%' with SUPER privileges, legacy mysql_native_password hashes, and Ssl_cipher = NULL. We staged dual passwords, migrated each pool to caching_sha2_password + TLS 1.3, and scoped grants via SQL Roles.

Accounts with SUPER / ALL11 → 1 DBA role
TLS 1.3 encrypted sessions18% → All pools

1. Read-only privilege, auth plugin, and TLS session audit

Read-only diagnostic SQL

-- Inspect authentication plugins, wildcard hosts, and lock policies
SELECT user, host, plugin, account_locked, password_expired
FROM mysql.user
WHERE plugin != 'caching_sha2_password' OR host = '%';

-- Identify administrative SUPER or SYSTEM_VARIABLES_ADMIN grants
SELECT grantee, privilege_type, is_grantable
FROM information_schema.user_privileges
WHERE privilege_type IN ('SUPER', 'ALL PRIVILEGES');

2. Staged remediation (dual-password rotation, SQL Role & TLS enforcement)

Guarded remediation SQL

-- Stage caching_sha2_password while keeping current password active
ALTER USER 'checkout_app'@'10.24.%.%'
  IDENTIFIED WITH caching_sha2_password BY '<NewStrongSecret>'
  RETAIN CURRENT PASSWORD
  REQUIRE TLS;

-- Grant least-privilege role and enforce secure transport globally
CREATE ROLE IF NOT EXISTS 'role_checkout_rw';
GRANT SELECT, INSERT, UPDATE, DELETE ON checkout_prod.* TO 'role_checkout_rw';
GRANT 'role_checkout_rw' TO 'checkout_app'@'10.24.%.%';
SET PERSIST require_secure_transport = ON;

3. Rollback commands

Immediate rollback SQL

SET PERSIST require_secure_transport = OFF;
-- If a legacy client pool fails handshake before secret rollout completes:
ALTER USER 'checkout_app'@'10.24.%.%' REQUIRE NONE;

Ways to work together

Choose the MySQL security engagement that fits your timeline

Start with a free baseline check on one instance, a fixed-scope CIS security audit and hardening project ahead of your compliance window, or ongoing remote DBA coverage.

Fixed-scope projectThis page

Full MySQL security audit and CIS hardening.

A 2-week read-only assessment, written CIS gap report mapped to your compliance framework, and optional hands-on remediation with rollback plans.

Deliverables scoped in writing before work starts

  • Least-privilege SQL Roles
  • caching_sha2 & TLS 1.3
  • Keyring TDE & binlogs
  • Audit plugin & SIEM
  • CIS & PCI/HIPAA/SOC 2 map
Free baseline check

One MySQL instance checked, free.

A read-only check of one MySQL instance covering top privilege risks, TLS status, and EOL version exposure.

What we inspect on one instance

  • Wildcard grants and SUPER privilege exposure
  • mysql_native_password and TLS transport status
  • InnoDB tablespace and backup encryption flags
Ongoing operations

Continuous privilege, patch, and backup care.

Quarterly grant reviews, minor CVE patching, TLS certificate rotation, and restore drills. Support is 24/7.

  1. Page us24/7
  2. 15 minsP1 response SLA
  3. Forensicsbinlog & audit review

For procurement and security

Mutual NDA first, read-only catalog inspection, and zero row-data exports

Our engineers inspect metadata catalogs (mysql.user, information_schema, performance_schema) rather than customer application tables. Your team approves every change and keeps all audit scripts and reports.Raguraman, Head of DBSRE · Allen D, Principal Engineer
  • Mutual NDA
  • Written statement of work
  • Read-only metadata access
  • Access revoked on completion
  • NDA before access

    Signed before any diagnostic session. The initial scoping call requires no database credentials.

  • Fixed written scope

    Target clusters, compliance frameworks, deliverables, and fees confirmed in writing before kickoff.

  • Metadata-only read access

    Named read-only accounts scoped to system catalogs through your bastion, VPN, or session manager.

  • Auditor-ready handover

    You keep the complete CIS gap report, SQL verification queries, and remediation runbooks. Meet the JusDB team.

JusDB's security practices are aligned with ISO 27001 and SOC 2 Type II, and JusDB is pursuing both certifications (see Terms, section 12). Read the stated status.

FAQ

Common MySQL security audit questions

Answers on read-only audit access, caching_sha2_password migration, TLS 1.3, InnoDB TDE, audit log overhead, and compliance mapping.

Still have a question?

Ask it on a scoping call. No production access needed.

Book a 30-min scoping call (opens Google Calendar in a new tab)

What is included in a JusDB MySQL security audit?

A JusDB MySQL security audit is a read-only assessment of your MySQL catalog privileges (mysql.user, mysql.db, role edges), authentication plugins (mysql_native_password vs caching_sha2_password), TLS 1.3 in-transit and replication encryption, InnoDB keyring TDE and binary log encryption, audit logging plugins, backup encryption, and OS/cloud network exposure against the CIS MySQL Benchmark. You receive a severity-ranked written report, copy-paste remediation SQL with rollback steps, and a control mapping matrix for your compliance reviewers.

Does a MySQL security audit require production downtime or write access?

No. The diagnostic phase is read-only and uses non-blocking queries against mysql catalog tables, information_schema, and performance_schema. It does not lock tables, scan application data rows, or alter production settings. If you ask JusDB to execute the remediation phase, changes are staged with dual passwords and online configuration updates during approved maintenance windows.

How do you migrate accounts from mysql_native_password to caching_sha2_password without breaking applications?

We first inspect performance_schema.session_connect_attrs to verify which connector versions and TLS settings each application pool uses. On MySQL 8.0+, we use dual-password support (ALTER USER ... IDENTIFIED WITH caching_sha2_password BY 'new_secret' RETAIN CURRENT PASSWORD) so existing pods keep authenticating while deployments roll out the updated secret, then run DISCARD OLD PASSWORD once connection logs confirm zero legacy handshakes.

Which compliance frameworks does the MySQL security audit report map to?

We map every technical finding and remediation step to the CIS MySQL Benchmark (Level 1 and Level 2) and to the database control requirements of PCI-DSS v4.0, the HIPAA Security Rule, SOC 2 Type II, ISO 27001:2022, and GDPR Article 32 so your engineering and compliance teams can hand the evidence directly to your external assessors.

Does the audit cover managed MySQL on Amazon RDS, Aurora, Google Cloud SQL, and Azure Flexible Server?

Yes. On managed cloud services, the cloud provider secures the physical host and storage layer, while your team remains responsible for parameter group flags (require_secure_transport, local_infile, log_bin_trust_function_creators), KMS customer-managed keys, IAM database authentication, mysql.user privileges, and audit log streaming. We inspect both the cloud control plane configuration and the internal MySQL catalog.

How do you enable MySQL audit logging without degrading query performance?

Turning on the general_log in production hurts throughput because it writes every statement synchronously. Instead, we configure the Percona Audit Log Plugin (audit_log_filter), MySQL Enterprise Audit, or the RDS MariaDB Audit Plugin with asynchronous buffering and rule-based filters that record DDL, DCL (GRANT/REVOKE), administrative sessions, and failed logins while excluding high-frequency application SELECTs.

What is JusDB's own security and compliance posture during an audit engagement?

JusDB's security practices are aligned with ISO 27001 and SOC 2 Type II, and JusDB is pursuing both certifications (see Terms, section 12). Every engagement begins with a mutual NDA, uses named least-privilege read-only accounts through your bastion or VPN, and revokes access upon completion.

Next step

Prepare your MySQL estate for your next security review

Tell us which MySQL versions, cloud platforms, and compliance frameworks are in scope. The first 30-minute call covers your databases, current ownership, and required coverage. No production access is needed. Or request a free audit of one database instance, subject to availability: mutual NDA before read-only access, a prioritized report within one week after access is ready, and no obligation.

NDA before access · read-only by default · written scope first