Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

offset-extract.sh error in ubuntu 18.04 #249

Open
lzj960515 opened this issue Aug 23, 2022 · 3 comments
Open

offset-extract.sh error in ubuntu 18.04 #249

lzj960515 opened this issue Aug 23, 2022 · 3 comments

Comments

@lzj960515
Copy link

ubuntu18.04
mysql 5.7.39
plugin: audit-plugin-mysql-5.7-1.1.12-999-linux-x86_64.zip

image

I found a similar issue: #234

Is there a solution now?

Thank You

@penascimento
Copy link

I have seen and also experienced this bug numerous times!!
And only now, I figured out what the problem was — it as to do with the MySQL server package installed.

You have to have the -dbgsym .deb server (in your case I think is mysql-community-server-dbgsym_5.7.39-1ubuntu18.04_amd64.deb). Side note dbgsym stands for "Debug SYMbols." (those symbols are the ones that the error is saying that it could not find)
You just download the file and run
# dpkg -i mysql-community-server-dbgsym_5.7.39-1ubuntu18.04_amd64.deb
after that, the offset-extarct should run!

I hope it helps!

@lzj960515
Copy link
Author

@penascimento Thank you for your help, but still no success.

I followed this document for the installation : https://ubuntu.pkgs.org/18.04/mysql-5.7-amd64/mysql-community-server-dbgsym_5.7.40-1ubuntu18.04_amd64.deb.html

image

@penascimento
Copy link

@penascimento Thank you for your help, but still no success.

I followed this document for the installation: https://ubuntu.pkgs.org/18.04/mysql-5.7-amd64/mysql-community-server-dbgsym_5.7.40-1ubuntu18.04_amd64.deb.html

image

First, all my tests have shown me that not all versions of MySQL 5.7 have a compatible audit for every ubuntu version!

With that in mind, the latest MySQL version I got working in ubuntu 18.04 with an operational audit, after several tries, was MySQL 8.0.25 (with audit v1.1.12-999).

I used MySQL dpkg directly from mysql.com

The procedure that I created, from various online posts (sorry I can not remember all places from where I compiled all this info),
is this (this will work in every clean install of ubuntu 18.04):
mkdir temp_mysql_8.0.25 && cd temp_mysql_8.0.25/ && sudo apt update && sudo apt install -y wget libaio1 libmecab2 && wget https://downloads.mysql.com/archives/get/p/23/file/mysql-server_8.0.25-1ubuntu18.04_amd64.deb-bundle.tar && wget https://downloads.mysql.com/archives/get/p/23/file/mysql-community-server-core-dbgsym_8.0.25-1ubuntu18.04_amd64.deb && sudo apt install gdb -y && tar -xvf mysql-server_*.tar && rm *test* | rm *.tar
to install just run:
sudo dpkg -i libmysql* mysql*
get the offset running:
sudo ./offset-extract.sh /usr/sbin/mysqld
to install the plugin "libaudit_plugin.so", download audit v1.1.12-999 and after putting the libaudit_plugin.so in the server just run:
sudo cp libaudit_plugin.so /usr/lib/mysql/plugin/.
then append information from offset-extract in the /etc/mysql/mysql.conf.d/mysqld.cnf

restart MySQL and that should do it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants