STIGhubSTIGhub
STIGhub— A free STIG search and compliance tool·STIGs updated 1 hour ago
Powered by Pylon·Privacy·Terms·Feedback·© 2026 Beacon Cloud Solutions, Inc.
← Back to Oracle MySQL 9.x Security Technical Implementation Guide

V-289275

CAT II (Medium)

The MySQL Database Server 9.x must generate audit records when privileges/permissions are added.

Rule ID

SV-289275r1319410_rule

STIG

Oracle MySQL 9.x Security Technical Implementation Guide

Version

V1R1

CCIs

CCI-000172

Discussion

Changes in the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized elevation or restriction of individual and group privileges could go undetected. Elevated privileges give users access to information and functionality that they must not have; restricted privileges wrongly deny access to authorized users. In an SQL environment, adding permissions is typically done via the "GRANT" command, or, in the negative, the "DENY" command. Satisfies: SRG-APP-000495-DB-000326, SRG-APP-000495-DB-000327, SRG-APP-000495-DB-000328, SRG-APP-000495-DB-000329

Check Content

Check that MySQL Server Audit is being used for the STIG compliance audit.

Verify that the MySQL Enterprise Audit component is installed:
SELECT *
FROM mysql.component
WHERE component_urn = 'file://component_audit_log';

If no row is returned, this is a finding.

Verify that audit logging has not been disabled:
SHOW GLOBAL VARIABLES LIKE 'audit_log.disable';

If "audit_log.disable" is "ON", this is a finding.

Review audit filters and associated users by running the following queries:
SELECT `audit_log_filter`.`NAME`,
   `audit_log_filter`.`FILTER`
FROM `mysql`.`audit_log_filter`;

SELECT `audit_log_user`.`USER`,
   `audit_log_user`.`HOST`,
   `audit_log_user`.`FILTERNAME`
FROM `mysql`.`audit_log_user`;

All currently defined audits for the MySQL server instance will be listed. If no audits are returned, this is a finding.

Determine if rules are in place to capture the following types of commands related to permissions by running the command:
SELECT * FROM mysql.audit_log_filter;

If the template SQL filter was used, it will have the name "log_stig".

Review the filter value. Ensure filters for events based on the "general_sql_command.str" field capture the following SQL statement types:
grant
grant_roles
revoke
revoke_all
revoke_roles
drop_role
alter_user_default_role
create_role
set_role
create_user
alter_user
drop_user
rename_user
show_create_user

Fix Text

Configure the MySQL Database Server to audit when privileges/permissions are added.

Add the following events to the MySQL Server Audit being used for the STIG compliance audit: 
grant
grant_roles
revoke
revoke_all
revoke_roles
drop_role
alter_user_default_role
create_role
set_role
create_user
alter_user
drop_user
rename_user
show_create_user

Refer to the following link for more information: https://dev.mysql.com/doc/refman/9.7/en/audit-log-component.html.