-
Notifications
You must be signed in to change notification settings - Fork 59
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
new debian mysql does not load plugin #72
Comments
Can you send out the mysql error log. Also can you specify the exact On Tue, Jan 28, 2014 at 2:04 PM, vincentkersten notifications@github.comwrote:
|
Dear Guy, apt-get source mysql-server Get:1 http://security.debian.org/ wheezy/updates/main mysql-5.5 5.5.35+dfsg-0+wheezy1 (dsc) [2,990 B] (this is from adding it then carries on and applies debian-specific patches: the error from the logs is
my config is in /etc/mysql/conf.d/mysqld_AUDIT_plugin.cnf:
|
Hi,
but at last:
Im not sure thats the right way to get those offsets, isnt it? But maybe this approach could help with this Problem too. Jörg Error with github master and no configured offsets:
|
Hi Jorg, Thanks for reporting this problem. The offsets already exist in the latest dev snapshot (1.0.4). 1,0.3 fails as it doesn't have the offsets. Problem is we fail hot patching the function log_slow_statement on debian. I think this function is compiled differently on debian compared to other distributions. Log message regarding this failure: Audit Plugin: unable to hot patch log_slow_statement Anyway, hot patch log_slow_statement is not critical for monitoring. I am going to commit a fix for this. |
New build is availabe here: https://bintray.com/mcafee/mysql-audit-plugin/dev-snapshot/1.0.4-459/files . I am closing the issue. If you encounter any issues or have questions feel free to re-open. |
Seems to work like a charm. Thank you! |
Guy, |
atze234, Not sure how you are compiling. But to get the offsets you need to compile with the exact same cmake command used by the debian build system. I think the problem is that you added -DWITH_DEBUG=ON to debian/rules . |
Ah, i thought i have to activate it to get the symbols, but its just an
Now there are symbols in it, but the offset Extract says: //offsets for: /root/mysqld (5.5.35-0) almost there :( |
Hello AZ Regards, Vincent |
Hi Vincent,
Jörg |
The nostrip option is needed to avoid stripping but you also need to add "-g". I took a look at the rules file and you need to modify the file and add "-g" to CFLAGS and CXXFLAGS passed to cmake. So modify the line: CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O2 -DBIG_JOINS=1 ${FORCE_FPIC_CFLAGS} -fno-strict-aliasing"} To: CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-g -O2 -DBIG_JOINS=1 ${FORCE_FPIC_CFLAGS} -fno-strict-aliasing"} And: CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O3 -DBIG_JOINS=1 -felide-constructors -fno-exceptions -fno-rtti ${FORCE_FPIC_CFLAGS} -fno-strict-aliasing"} to: CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-g -O3 -DBIG_JOINS=1 -felide-constructors -fno-exceptions -fno-rtti ${FORCE_FPIC_CFLAGS} -fno-strict-aliasing"} |
I've added instructions for Debian build on the wiki page: https://github.com/mcafee/mysql-audit/wiki/Troubleshooting . Any comments are welcome. |
Well done, Guy and Jorg, instructions look good and all is well again :) Vincent |
Works very well with the "-g" build offsets. |
Hello,
yet another issue with the plugin not working :(
ERROR 1123 (HY000): Can't initialize function 'AUDIT'; Plugin initialization function failed.
when issuing "INSTALL PLUGIN AUDIT SONAME 'libaudit_plugin.so'; "
I have tried:
audit-plugin-mysql-5.5-1.0.3-371-linux-x86_64.zip
audit-plugin-mysql-5.5-1.0.4-456-linux-x86_64.zip
apt-get source mysql-server
cd mysql-5.5-5.5.35+dfsg/
cmake .
cd extra/
make
cd ../libservices/
make
cd ../../
wget https://github.com/mcafee/mysql-audit/archive/master.zip
unzip && cd mysql-audit-master/
./configure --with-mysql=../mysql-5.5-5.5.35+dfsg --with-mysql-libservices=../mysql-5.5-5.5.35+dfsg/libservices/libmysqlservices.a
make
scp src/.libs/libaudit_plugin.so.0.0.0 root@sqlserver:/usr/lib/mysql/plugin/libaudit_plugin.so
... of course with mysql restarts in-between, but to no avail. I would like to end up with a recipe for recreating the plugin when upgrades break this, since we obviously want to audit stuff :) and it worked very well so far.
Please let me know if I can do something else or provide you with more information.
Vincent
The text was updated successfully, but these errors were encountered: