trellix-enterprise / mysql-audit

AUDIT Plugin for MySQL. See wiki and readme for description. If you find the plugin useful, please star us on GitHub. We love stars and it's a great way to show your feedback.
Other
239 stars 57 forks source link

MySQL 8.0.33: undefined symbol: my_charset_utf8_general_ci #261

Open tapochkin opened 1 year ago

tapochkin commented 1 year ago

Greetings. I'm getting the following error trying to install libaudit_plugin.so. Any ideas what to do?

2023-07-06T08:59:59.694768Z 0 [ERROR] [MY-010901] [Server] Can't open shared library '/usr/lib64/mysql/plugin/libaudit_plugin.so' (errno: 0 /usr/lib64/mysql/plugin/libaudit_plugin.so: undefined symbol: my_charset_utf8_general_ci).
2023-07-06T08:59:59.694855Z 0 [ERROR] [MY-010736] [Server] Couldn't load plugin named 'AUDIT' with soname 'libaudit_plugin.so'.

OS distribution and version:

cat /etc/os-release
NAME="AlmaLinux"
VERSION="8.8 (Sapphire Caracal)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="AlmaLinux 8.8 (Sapphire Caracal)"
ANSI_COLOR="0;34"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:almalinux:almalinux:8::baseos"
HOME_URL="https://almalinux.org/"
DOCUMENTATION_URL="https://wiki.almalinux.org/"
BUG_REPORT_URL="https://bugs.almalinux.org/"

ALMALINUX_MANTISBT_PROJECT="AlmaLinux-8"
ALMALINUX_MANTISBT_PROJECT_VERSION="8.8"
REDHAT_SUPPORT_PRODUCT="AlmaLinux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.8"

MySQL version:

yum list installed | grep mysql
mysql-community-client.x86_64               8.0.33-1.el7                                 @mysql80-community
mysql-community-client-plugins.x86_64       8.0.33-1.el7                                 @mysql80-community
mysql-community-common.x86_64               8.0.33-1.el7                                 @mysql80-community
mysql-community-icu-data-files.x86_64       8.0.33-1.el7                                 @mysql80-community
mysql-community-libs.x86_64                 8.0.33-1.el7                                 @mysql80-community
mysql-community-server.x86_64               8.0.33-1.el7                                 @mysql80-community
mysql80-community-release.noarch            el7-7                                        @mysql80-community

Tested plugin versions (MariaDB and 5.7 versions return different errors):

audit-plugin-mariadb-10.5.4-1.1.13-1008-linux-x86_64.zip
audit-plugin-mysql-5.7-1.1.12-999-linux-x86_64.zip
audit-plugin-mysql-8.0-1.1.11-985-linux-x86_64.zip
audit-plugin-mysql-8.0-1.1.12-999-linux-x86_64.zip
audit-plugin-mysql-8.0-1.1.13-1008-linux-x86_64.zip
sekarcinfosec commented 1 year ago

@tapochkin You found fix for this ?

tapochkin commented 1 year ago

Unfortunately, no. Personally I have some time before I really need audit module to work. In case I come up with solution, I post it here.

andrei1058 commented 1 year ago

Unfortunately, no. Personally I have some time before I really need audit module to work. In case I come up with solution, I post it here.

up

zhangguangrui1991 commented 1 year ago

The same issue also appeared in MySQL version 8.0.34.

kubo commented 1 year ago

my_charset_utf8_general_ci was renamed to my_charset_utf8mb3_general_ci by https://github.com/mysql/mysql-server/commit/83f688baa214b0e2696d1ae9ba0d400b92fa2e0c, which affects MySQL 8.0.31 or later. my_charset_utf8_bin referred by src/audit_handler.cc was also renamed.

WKupper commented 10 months ago

It is really critical that a new version get built utilizing this fix. Plugin is currently unusable for MySQL 8.0

zhaopinglu commented 10 months ago

I wrote a step-by-step page for this. https://github.com/zhaopinglu/mysql-audit/blob/master/Note_for_MySQL8.0.33.md

djkerya commented 9 months ago

I had a kind of script for building with 8.0.36 tested on Rocky 8.9

took @zhaopinglu note as the base

https://techblog.kerya.net/74-mysql-audit-plugin-build-script