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
Add support for MariaDB 10.1.{10,11}.
Fix segfault for set var to null (issue 133).
If password masking regex doesn't compile, revert to default regex.
80 lines
1.6 KiB
Plaintext
80 lines
1.6 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: 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
|
|
|
|
==== 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
|
|
|