Get Error 'unknown variable 'audit_log_policy=NONE' After Running mysqld --validate-config

Description

When I validate my config file I get an error stating audit_log_policy is an unknown variable. Here is the command and results:

sudo mysqld --validate-config
2024-03-22T23:33:30.894349Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2024-03-22T23:33:30.897968Z 0 [ERROR] [MY-000067] [Server] unknown variable 'audit_log_policy=NONE'.
2024-03-22T23:33:30.897993Z 0 [ERROR] [MY-010119] [Server] Aborting

 

And version info:

mysqld --version
/usr/sbin/mysqld Ver 8.0.36-28 for Linux on x86_64 (Percona Server (GPL), Release '28', Revision '47601f19'$)

 

OS version:

cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS"
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/ "
SUPPORT_URL="https://help.ubuntu.com/ "
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/ "
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy "
UBUNTU_CODENAME=jammy

 

kernel version:

uname -mrs
Linux 5.15.0-100-generic x86_64

Environment

None

Activity

Aaditya Dubey 
September 7, 2024 at 2:55 PM

Hi

We still haven't heard any news from you. So, I assume the issue no longer persists and will close the ticket. If you disagree, reply and create a follow-up with a new Jira report.

Aaditya Dubey 
April 19, 2024 at 10:04 AM
(edited)

Hi

Thank you for the report.
It looks like you didn't enable the audit log plugin, please try running below command:

mysql> INSTALL PLUGIN audit_log SONAME 'audit_log.so'; mysql [localhost:8037] {msandbox} ((none)) > select version(); +-----------+ | version() | +-----------+ | 8.0.36-28 | +-----------+ 1 row in set (0.00 sec) mysql [localhost:8037] {msandbox} ((none)) > SHOW variables LIKE 'audit%'; +-----------------------------+---------------+ | Variable_name | Value | +-----------------------------+---------------+ | audit_log_buffer_size | 1048576 | | audit_log_exclude_accounts | | | audit_log_exclude_commands | | | audit_log_exclude_databases | | | audit_log_file | audit.log | | audit_log_flush | OFF | | audit_log_format | OLD | | audit_log_handler | FILE | | audit_log_include_accounts | | | audit_log_include_commands | | | audit_log_include_databases | | | audit_log_policy | ALL | | audit_log_rotate_on_size | 0 | | audit_log_rotations | 0 | | audit_log_strategy | ASYNCHRONOUS | | audit_log_syslog_facility | LOG_USER | | audit_log_syslog_ident | percona-audit | | audit_log_syslog_priority | LOG_INFO | +-----------------------------+---------------+ 18 rows in set (0.00 sec) mysql [localhost:8037] {msandbox} ((none)) > set global audit_log_policy=NONE; Query OK, 0 rows affected (0.00 sec)

Document Reference https://docs.percona.com/percona-server/5.7/management/audit_log_plugin.html#installation

Also, this variable is deprecated in 8.0.34. Please check https://dev.mysql.com/doc/refman/8.0/en/audit-log-reference.html#sysvar_audit_log_policy

Done

Details

Assignee

Reporter

Needs QA

Affects versions

Priority

Created March 22, 2024 at 11:49 PM
Updated September 7, 2024 at 2:55 PM
Resolved September 7, 2024 at 2:55 PM

Flag notifications