You've already forked mysql-audit
mirror of
https://github.com/trellix-enterprise/mysql-audit.git
synced 2025-12-14 18:14:01 +08:00
Percona64 5.7.30-33, 5.7.29-32, 5.7.28-31, 5.7.27-30, 5.7.26-29 MySQL64 8.0.22, 9.0.21, 8.0.20, 8.0.19, 8.0.18, 8.0.17, 8.0.16, 8.0.15, 8.0.14, 8.0.13, 8.0.12, 8.0.11, 5.6.49, 5.7.31, 5.6.46, 5.6.47, 5.6.48, 5.7.30, 5.7.29, 5.7.28, 5.6.45, 5.7.27, 5.6.44, 5.7.26 MariaDB64 10.1.43, 10.2.27, 10.2.29, 5.5.66, 10.1.47, 10.2.34, 10.2.30, 10.2.33, 10.1.46, 10.2.31, 10.1.44, 10.1.45, 10.2.32, 5.5.67, 5.5.68, 10.1.41, 10.2.26, 5.5.65, 10.2.25, 10.1.40, 10.1.39, 10.2.24, 10.2.23, 5.5.64 MySQL32 5.6.49, 5.7.31, 5.6.46, 5.6.47, 5.6.48, 5.7.28, 5.7.29, 5.7.30, 5.6.45, 5.7.27, 5.6.44, 5.7.26 MariaDB32 10.1.43, 10.2.27, 10.2.29, 5.5.66, 10.1.47, 10.2.34, 10.2.30, 10.2.33, 10.1.46, 10.2.32, 10.1.44, 10.1.45, 10.2.31, 5.5.67, 5.5.68, 10.1.41, 10.2.26, 5.5.65, 10.2.25, 10.1.40, 10.1.39, 10.2.24, 10.2.23, 5.5.64
101 lines
2.8 KiB
Plaintext
101 lines
2.8 KiB
Plaintext
Compiling instructions
|
|
=======================
|
|
|
|
Make sure you have installed the following packages:
|
|
|
|
autoconf
|
|
automake
|
|
gcc-c++
|
|
|
|
To compile you will need to obtain the MySQL source code. MySQL source code is available at:
|
|
|
|
http://dev.mysql.com/downloads/mysql/
|
|
|
|
==== MySQL 5.1 ======
|
|
|
|
Extract the MySQL source code in the root directory. For example:
|
|
|
|
unzip zip-sources/mysql-5.1.40.zip
|
|
|
|
|
|
Then run the following command:
|
|
|
|
cd mysql-5.1.40
|
|
CXX=gcc ./configure
|
|
cd include
|
|
make
|
|
|
|
Then goto top dir and run:
|
|
|
|
chmod +x bootstrap.sh
|
|
./bootstrap.sh
|
|
|
|
This will create configure script. Then run:
|
|
|
|
CXX='gcc -static-libgcc' CC='gcc -static-libgcc' ./configure --with-mysql=mysql-5.1.40
|
|
|
|
|
|
==== MySQL 5.5 / 5.6 / 5.7 ======
|
|
|
|
Extract MySQL 5.5, 5.6, or 5.7 source code
|
|
|
|
go to mysql-src dir and run:
|
|
|
|
cd mysql-5.5.x or mysql-5.6.x or mysql-5.7.x
|
|
cmake .
|
|
make
|
|
|
|
Note: MySQL 5.7 requires Boost 1.59. You may have to install that
|
|
first (see www.boost.org). In such a case, use:
|
|
|
|
cmake -DWITH_BOOST=/path/to/boost_1_59_0 .
|
|
|
|
Note: For MariaDB use: cmake . -DBUILD_CONFIG=mysql_release
|
|
|
|
Note: For Percona`s MySQL use: cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DWITH_BOOST=boost_1_59_0 .
|
|
|
|
Note: to speed things up it is possible to build just the following directories:
|
|
libservices
|
|
extra
|
|
|
|
back to working dir and run:
|
|
|
|
chmod +x bootstrap.sh
|
|
./bootstrap.sh
|
|
CXX='gcc -static-libgcc' CC='gcc -static-libgcc' ./configure --with-mysql=mysql-5.x.x --with-mysql-libservices=mysql-5.x.x/libservices/libmysqlservices.a
|
|
make
|
|
|
|
Note: For Percona`s MySQL define also PERCONA_BUILD=true variable, like "PERCONA_BUILD=true ./configure..."
|
|
|
|
==== Compiling with make =====
|
|
|
|
Go to top source dir and run:
|
|
|
|
make
|
|
|
|
Plugin will be compiled at:
|
|
|
|
src/.libs/libaudit_plugin.so
|
|
|
|
Some documentation about configure command for mysql:
|
|
|
|
http://dev.mysql.com/doc/refman/5.1/en/source-configuration-options.html
|
|
|
|
|
|
==== MariaDB 10.2.10 ======
|
|
1. Firstly checkout the source code:-
|
|
- svn co https://beasource3.corp.nai.org/svn/projects/DBSec-MySQL audit_plugin_mysql
|
|
2. cd audit_plugin_mysql
|
|
3. unzip zip-sources/mariadb-10.2.10.zip
|
|
4. cd mariadb-10.2.10
|
|
5. CC=gcc CXX=g++ cmake . -DBUILD_CONFIG=mysql_release -DGNUTLS_INCLUDE_DIR=./zip-sources/mariadb-10.2.10/gnutls-3.3.24/64b/include -DGNUTLS_LIBRARY=./zip-sources/mariadb-10.2.10/gnutls-3.3.24/64b/lib
|
|
6. cd mariadb-10.2.10/libservices
|
|
7. make
|
|
8. cd ../extra
|
|
9. make
|
|
10. cd ../..
|
|
11. chmod +x bootstrap.sh
|
|
12. ./bootstrap.sh
|
|
13. CXX='gcc -static-libgcc' CC='gcc -static-libgcc' MYSQL_AUDIT_PLUGIN_VERSION=1.1.7 MYSQL_AUDIT_PLUGIN_REVISION=`svn info|grep ^Revision|awk -F ": " '{print $2}'` ./configure --enable-debug=no --with-mysql=mariadb-10.2.10 --with-mysql-libservices=mariadb-10.2.10/libservices/libmysqlservices.a
|
|
14. gmake <======== This will create the plugin "libaudit_plugin.so"
|