PostgreSQL vs MySQL for PCI DSS: which side fits this requirement
Choose PostgreSQL when your team wants direct control over database configuration and can staff the controls itself, including TLS, role design, logging and the pgAudit extension for detailed audit trails. Choose MySQL Community Server when your applications already run on MySQL and your team is ready to follow its LTS and Innovation release tracks and to confirm which audit and authentication features it needs. Either way, no PCI DSS Attestation of Compliance applies to either community server, because each one is software you run. Your organization carries the PCI DSS obligations in both cases, and PCI DSS v4.0.1 is the only active version to assess against.
The PostgreSQL side is released under the PostgreSQL License, a liberal license similar to the BSD or MIT licenses, so license terms rarely drive the decision for internal use. Its supported major versions run to November 8, 2029 for version 17 and November 14, 2030 for version 18, but version 14 support ended on November 12, 2026, so confirm that no production cluster still runs it. For encryption in transit, PostgreSQL uses TLS on TCP connections, and you set the server and client settings that enforce it. The MySQL side documents TLS encrypted connections, require_secure_transport to refuse unencrypted TCP clients and per-account REQUIRE X509, which together support the same kind of encryption in transit control. MySQL Community Edition is GPL licensed, so have counsel review the GPL terms if you distribute modified binaries.
The decision turns on three checks. First, pick the major version and confirm its end-of-support date against the vendor's published dates before the assessment starts. Second, map each PCI DSS requirement that touches the database, including encryption in transit, access control and audit logging, to a named setting, extension or procedure in your environment, and keep the evidence an assessor will ask for. Third, confirm in writing with the vendor whether the audit and multifactor authentication features you need are in the Community Server or only in a commercial edition. This page covers only the PCI DSS angle, and the general PostgreSQL vs MySQL comparison is on its own page. Keep configuration baselines and a tested upgrade plan on file, since minor releases replace executables and major upgrades need a separate path.
How cardholder data flows through the database tier and its evidence trail
The diagram starts with application servers and admin workstations inside the cardholder data environment, each reaching the database server over an encrypted connection. The first hop is encryption in transit, which the organization configures on the server and on every client. The second is access control for admin sessions, set through database roles and accounts. Audit records written on the database tier then leave for a separate evidence store, so the export, its protection and its retention are the organization's to set up. Confirm that the evidence store and admin workstations fall within the assessed scope, and that each hop has a named owner and a test.
Client traffic reaches the database; audit logs leave for evidence.
What PCI DSS asks of a database in the cardholder data environment
PCI DSS applies to any entity that stores, processes or transmits cardholder data or sensitive authentication data, and to any entity that could affect the security of the cardholder data environment (CDE). That includes merchants, processors, acquirers, issuers and service providers, and it reaches your database team whenever a database sits inside the CDE or in a system that can affect it. The version to plan against is PCI DSS v4.0.1, published on 11 June 2024 as a limited revision with no added or deleted requirements. PCI DSS v4.0 was retired on 31 December 2024, so v4.0.1 is the only active version. Of the 64 new requirements introduced in v4.0, 51 were future-dated and became effective on 31 March 2025, so most of them are now enforced and no longer optional best practices.
In plain terms, a database in the CDE has to support a set of control areas that your assessor will map to requirement numbers. The main ones are protecting cardholder data at rest and in transit, restricting access so each person has a unique ID and only the roles their job needs, requiring strong authentication for administrative and remote access, recording who did what in logs that are protected and reviewed, keeping the software patched and configured to a documented hardening baseline, and controlling changes and backups. The database supplies the mechanisms, but your team owns the work around them: key management, role design, log retention and review, and patch cadence. Ask your assessor which requirement numbers they will test in each area before you lock in settings, so the evidence you collect matches what they sample.
Two checks are worth running early. First, list every account that can reach the database, including application service accounts, DBA accounts and backup jobs, and confirm each one has a named owner and a documented reason to exist. Second, confirm the database's supported version window covers your assessment period. PostgreSQL 14 was supported only until November 12, 2026, so a database built on it today is already out of support and would be a finding waiting to happen. Support windows differ by database and release track, so check the current end-of-life date for the exact version you plan to deploy. The organization, not the database vendor, owns the configuration, the keys, the logs and the evidence that the controls work.
How PostgreSQL vs MySQL for PCI DSS compares control by control
This table sets PostgreSQL and MySQL 8.4 side by side on the database controls a PCI DSS assessment usually examines, using only what each vendor's documentation states. Where the documentation does not settle a point, such as edition coverage for audit logging, encryption at rest or multifactor authentication, the cell says what to confirm in the manual and with your assessor. The main takeaway is that neither project issues an attestation, so the evidence for either database comes from your own configuration.
| Control area | PostgreSQL as documented | MySQL 8.4 as documented |
|---|---|---|
| Encryption in transit | TLS support is described in the secure TCP/IP connections page. Confirm the server and client settings for your version. | TLS encrypted connections, require_secure_transport to refuse unencrypted TCP clients, and per-account REQUIRE X509. |
| Encryption at rest | Confirm in the encryption options page how stored data is protected, and with your assessor which layer you rely on. | InnoDB data encryption is documented for tablespaces. Confirm the keyring setup and which editions include it in the InnoDB data encryption page. |
| Access control | Role-based access is documented. The operator designs roles, grants and logging around its own PCI DSS controls. | Roles are documented in the roles page. Confirm how grants map to your access review with your assessor. |
| Multifactor authentication | Confirm in your build's authentication settings which second factors, if any, you can enforce, and check the result with your assessor. | Multifactor authentication for accounts is documented. Confirm which editions and plugins include it in the multifactor authentication page. |
| Audit logging | Server logging is documented in the logging settings page. The pgAudit extension, a separate project, adds detailed session and object auditing. | An audit log is documented in the audit log page. Confirm which editions include it and what events it records. |
| Patching and version support | Minor releases at least every three months. Each major version is supported for five years; version 14 support ends November 12, 2026. | LTS track with 5 years premier and 3 years extended support. Innovation releases last only until the next one. |
| Feature changes and upgrades | Minor releases keep the storage format, so updates replace executables and restart. Major upgrades use dump and restore, pg_upgrade or logical replication. | Features are added or removed only in the first release of an LTS series. Later LTS point releases carry only necessary fixes. |
| Attestation and assessor evidence | The PostgreSQL project is not a service provider and holds no PCI DSS Attestation of Compliance. Your own assessment covers the deployment. | No PCI DSS Attestation of Compliance applies to the community server, which is software you run. Your own assessment covers the deployment. |
How support windows and patch cadence shape PCI DSS maintenance
Support windows set how often your PCI DSS patching work has to happen, so check them before you choose a major version. The PostgreSQL versioning policy describes a new major version about once a year, minor releases at least once every three months, and five years of support for each major. The listed end dates are November 14, 2030 for version 18, November 8, 2029 for 17, November 9, 2028 for 16 and November 11, 2027 for 15. PostgreSQL 14 reached its end date on November 12, 2026, so any cluster still running it is on unsupported software today. Minor updates do not change the internal storage format, so applying one means replacing executables and restarting the server. Major upgrades are a separate project that needs its own change record, test plan and rollback path.
MySQL splits releases into two tracks, and the track you choose sets your patch calendar. LTS releases get 5 years of premier support and 3 years of extended support under the Oracle Lifetime Support Policy. Innovation releases are supported only until the next Innovation release, so a PCI DSS environment running one has to upgrade within that window. The MySQL Community Server download page currently offers 26.7.0 (Innovation), 9.7.2 LTS, 8.4.11 LTS and 8.0.46. Confirm the support status of 8.0.46 with Oracle before you rely on it. Also confirm whether the Lifetime Support Policy covers Community users at all, because a GPL installation may not receive the same coverage as a commercially supported one.
For an assessor, the practical question is who owns the patch calendar. The PostgreSQL project publishes end dates but holds no PCI DSS Attestation of Compliance, so your team must show that database patching follows that cadence under the Requirement 6 controls for secure software and vulnerability management. Keep a register with one row per cluster: major version, latest minor version applied, end-of-support date and, for MySQL, the track (LTS or Innovation). Set an alert for any Innovation instance so it never runs past the next Innovation release. Confirm the MySQL support dates in writing before the assessment, and confirm which PCI DSS version your assessor applies, since v4.0.1 is the only active version.
What an assessor asks for and how each side produces it
For PostgreSQL, the evidence is the configuration you set and the output you keep. The PostgreSQL project is not a service provider and holds no PCI DSS Attestation of Compliance, so your team produces and retains the files and logs below as part of its own controls.
- TLS settings: the
sslswitch, the certificate and key file paths, and thehostsslentries inpg_hba.confthat accept only encrypted TCP connections. Hand over the files as they stand in production, with the export date. - Role definitions:
CREATE ROLEscripts and an export ofpg_rolesandpg_auth_members, showing which accounts exist, what they can do and which hosts they connect from throughpg_hba.conf. - Logging configuration: the
logging_collector,log_connections,log_disconnectionsandlog_line_prefixsettings, so the assessor can see who connected and when. - pgAudit output: the audit records from the pgAudit extension for the statement classes you choose, with the
pgaudit.logsetting and the destination where those records are shipped and retained.
Confirm the exact setting names, catalog views and extension version for your PostgreSQL major version in the PostgreSQL manual before you export anything for the assessor.
For MySQL Community Server, the evidence comes from server variables and account definitions described in the MySQL 8.4 reference manual. Oracle does not issue a PCI DSS attestation for the server, so your team produces the settings, exports and logs below and keeps them.
- Transport enforcement: the
require_secure_transportsetting in the server configuration and the output ofSHOW GLOBAL VARIABLES LIKE 'require_secure_transport', which shows that unencrypted TCP clients are refused. Hand over both the configuration file and the live value. - Account certificate requirements:
SHOW CREATE USERoutput for each account that usesREQUIRE X509or a narrower certificate requirement, so the assessor can see which accounts must present a certificate. - Audit log configuration: the audit log settings, the file or destination where events are written, and the retention you apply to them. Confirm in the manual which audit log plugin your edition includes, because availability depends on the edition you run.
- Role grants:
SHOW GRANTSoutput for each role and account, with the role assignments described in the roles documentation, showing that access to the cardholder schema is limited to accounts that need it.
Confirm the exact variable names, plugin names and edition for your release in the MySQL 8.4 reference manual, and check whether administrator accounts in your deployment use multifactor authentication.
Several artifacts sit above the database engine and apply to both platforms. Assessors read them as one body of evidence, so they need one owner, one review cycle and one retention rule across PostgreSQL, MySQL and every other system in scope.
- Version inventory with support dates: every database server and client library in scope, its release, its end-of-support date and the date you last checked it. PostgreSQL 14 support ended on November 12, 2026, and PostgreSQL 15 is supported until November 11, 2027, according to the versioning policy. For MySQL, record the LTS or Innovation track and the dates from the Oracle Lifetime Support Policy.
- Cardholder data environment scope diagrams: dated network and data-flow diagrams showing every database host, replica, backup target and administrative path that touches cardholder data or could affect its security.
- Change records and patch evidence: tickets for version upgrades, configuration changes and minor-release patches, each with its approval and test result. PostgreSQL minor releases replace executables and restart without changing the storage format, so record when each one was applied.
- Backup restore tests and log retention: restore test records showing that a backup was restored and checked, plus the retention settings for database and audit logs, set to the period your own policy requires.
- Access reviews: periodic reviews of database accounts, roles and certificate holders, with the reviewer, the review date and every removal made.
Ask your assessor which format they accept for each item, and confirm the scope and requirement mapping against PCI DSS v4.0.1, the only active version.
Configuring either side for the database controls an assessor checks
This sequence takes a PostgreSQL or MySQL database from defined scope to a retested configuration, with the evidence to show for each control. The steps support the assessor's review and do not replace it: the assessor decides whether the controls meet PCI DSS for your environment, and the database software itself carries no Attestation of Compliance.
Confirm scope and cardholder data locations
List every database that stores, processes or transmits cardholder data, plus any database that could affect the security of that environment. Record the engine, version, host, network path and each application that connects to it. The compliance lead and the platform team own this list. It is done when the scope is signed off, each database has a named owner, and every database appears on the network diagram you will give the assessor. Review the list whenever an application or connection changes, because every later control is checked against it.
Enforce TLS and refuse unencrypted clients
Enable TLS on both engines and configure the server to refuse plaintext connections. On PostgreSQL, set
sslinpostgresql.confand allow onlyhostsslentries inpg_hba.conf. On MySQL 8.4, enable encrypted connections and setrequire_secure_transportso TCP clients without TLS are refused. Test from each application host with a client that deliberately omits TLS. It is done when the test connection is rejected, the rejection appears in the server logs, and the test output is saved with the date and tester's name.Set per-account identity and access
Give every application and administrator its own database account, with no shared logins. On MySQL 8.4, add REQUIRE X509 to accounts that need certificate-based identity, and confirm which multifactor authentication options your edition and version support for administrative accounts. On PostgreSQL, grant privileges through roles, make roles that should not log in
NOLOGIN, and limit superuser use. Remove default and unused accounts. It is done when an account listing from each engine matches the approved access list, and any generic or shared account left in place has a written justification.Configure logging and confirm audit availability
On PostgreSQL, set the connection, disconnection and statement logging options in
postgresql.conf, then install and configure pgAudit to record the access and privilege changes your assessor will ask about. On MySQL, confirm whether the audit log is available for your edition and version before you plan around it, and enable it only if it is. Decide where logs are stored, who can read them and how long they are kept under your own policy. It is done when a test login, a failed login and a privilege change each appear in the log store you chose.Decide stored data protection from the encryption pages
Read the PostgreSQL encryption options and the MySQL InnoDB data encryption documentation before choosing how cardholder data is protected at rest. Compare what each engine provides natively with what your storage layer, volume encryption or application-level encryption would provide, and record which party holds the keys. The security architect and the database team own this decision. It is done when a decision record names the mechanism, the key custodian, the key management process and the databases it covers, and you have confirmed that approach with your assessor.
Set a patch and support calendar
Record the version each database runs and its published end of support, then schedule upgrades ahead of those dates. The PostgreSQL versioning policy lists version 14 as supported to November 12, 2026, so any server on that version needs an upgrade plan now. PostgreSQL minor releases arrive at least once every three months. For MySQL, choose the LTS or Innovation track deliberately, because Innovation releases are supported only until the next Innovation release. It is done when each database has an owner, a test environment and a rollback path in the calendar.
Capture evidence and retest the controls
Collect the evidence the assessor will request for each control: configuration files, account and role listings, TLS test output, log samples showing the test events, the scope list and the change history. Store each item with its capture date and the name of the person who captured it. Rerun the TLS, account and logging tests after every configuration change and every patch. It is done when a retest matches the saved baseline or each difference has a recorded explanation. DeployOpen can prepare these artifacts, but independent assessors and certification bodies make the compliance determination.
Questions buyers ask before hiring help with PostgreSQL vs MySQL for PCI DSS
How much effort do PCI DSS database controls take to set up?
Effort depends mostly on how many databases are in scope, how much TLS and identity setup already exists, and how much log volume you must keep and for how long. One instance with encrypted connections, named accounts and audit logging already in place is a small review. Each extra cluster, replica or database adds its own checks: encryption in transit settings, account review, log routing and retention. PostgreSQL documents its SSL and logging settings, and pgAudit is a separate extension you must install, configure and test. For MySQL, confirm in the audit log documentation which parts apply to your edition before you plan. Ask any provider to split the estimate by database, connection path and log destination so you can see what drives the total.
How long does a PCI DSS database project usually take?
Duration is set by the agreed scope and by how many evidence gaps the team finds once work starts, so no single answer holds for every environment. A fixed-scope agreement fixes the deliverables and timeline in writing before work begins, which is the point to ask for a dated plan. The biggest variables are usually undocumented databases, configuration drift between environments, and log retention that was never set. Gaps found late tend to extend the schedule, because fixes often need a change window and a retest. Ask for the timeline to list each dependency, such as access grants, change approvals and the assessor's review dates, and to state what happens if a gap turns up mid-project. Treat any date given before a scope exists as a guess.
What does the work need from our team during the engagement?
The engagement needs named people who can decide, grant access and approve change, and it needs them early. Delays often trace back to owners who were never named. Expect to provide the following:
- Database owner: accepts configuration changes and owns the restart plan.
- Environment access: read access for review and change access for fixes, granted through your own accounts.
- Assessor expectations: a written list of the evidence the assessor accepts and the format they want.
- Change windows: dates when restarts and patches can happen on live systems.
Confirm each role in the written scope before work starts.
Can our in-house team run PCI DSS database controls without outside help?
Often yes, if you already have staff who run the databases, hold the security and logging skills, and can produce evidence on a schedule. The skills needed are database administration on the engine you choose, TLS and certificate management, identity and role design, log pipeline operations, and a working knowledge of what the assessor will test. A team that is strong in one area and new to others usually finds the gaps during the assessment, which is the expensive time to find them. Compare what your staff already do against that list, then decide which parts to keep in-house and which to outsource. Ask a partner to name the skills each deliverable needs so you can plan handover and cover for staff absences. The result is only as good as the people who must maintain it after go-live.
Should we buy a fixed-scope engagement or a retainer for patching and retesting?
Buy a fixed-scope engagement for the initial build and evidence, and add a retainer when you need ongoing patching, upgrades and continuous testing. Most DeployOpen engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts, and ongoing support, upgrades and continuous testing are available as retainers. The split matters because the one-time work ends at a defined handover, while patching recurs whenever a database minor release or security fix arrives. PostgreSQL minor releases replace executables and need a restart. MySQL Innovation track releases are supported only until the next Innovation release, so that track needs more frequent upgrades. A fixed scope suits a stable environment with a known database count. A retainer suits a team that expects frequent change. Ask what the retainer covers and how emergency changes are approved.
What evidence will a PCI DSS assessor ask for from our databases?
Assessors typically ask to see how each database is configured, who can access it, and how activity is logged and reviewed, with records that match the live system. Expect requests for TLS settings on each connection path, a list of accounts and roles with periodic reviews, sample audit log entries, log retention settings, and change records for patches and configuration updates. The community server has no attestation of its own, so the evidence must come from your environment and your process. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. The PCI Security Standards Council standards page is the starting point for the current standard. Confirm the exact evidence list with your assessor before collection starts.
Who is responsible for database controls, the software vendor or our organization?
Your organization is responsible for the controls. The PostgreSQL project is not a service provider and has no PCI DSS Attestation of Compliance, and the same applies to the community server, which is software you run. The engine gives you TLS, role-based access, logging and pgAudit to support your own controls, but configuring them, operating them and proving they work sits with you or your contractors. For MySQL, the manual documents encrypted connections, require_secure_transport to refuse unencrypted TCP clients, and per-account certificate requirements, all of which you must set and verify. Ask your partner to map each control to a named owner in the written scope, so nothing relies on the software by default.
How DeployOpen helps prepare evidence without certifying the database
DeployOpen plans, implements, hardens and documents self-hosted PostgreSQL or MySQL inside your own infrastructure, then prepares the controls and evidence your assessor will ask about. Neither PostgreSQL nor the MySQL Community Server holds a PCI DSS Attestation of Compliance, because the software is something you run, so the assessment covers your cardholder data environment. DeployOpen does not issue audit reports or certifications; your qualified assessor does.
How we scope
- The written scope names which databases, hosts, networks and cardholder data flows are in the assessed environment.
- The scope records the PostgreSQL major version or MySQL track (LTS or Innovation) and its support end date.
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
How we build
- Configure TLS for client connections and test that unencrypted TCP connections are refused.
- Set role-based access, per-account certificate requirements where used, and audit logging such as pgAudit on PostgreSQL.
- Configure logging and backups in your own environment, then document each control against the PCI DSS requirement it supports.
How we hand over
- A control matrix that maps each database setting to the PCI DSS requirement it supports and the evidence location.
- Configuration and runbook documentation for upgrades, including the documented minor and major upgrade path for your version.
- A list of evidence items your assessor will likely request, such as configuration exports, access reviews and log samples.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after the initial engagement.
- Ask your assessor which evidence format they accept before we finalize the control matrix.
- Confirm with the vendor or your qualified assessor which MySQL edition features and audit options your assessment depends on.

