forked from buysse/mysql-audit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compiling.txt
66 lines (37 loc) · 1.28 KB
/
compiling.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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 ======
Extract MySQL 5.5 source code
go to mysql-src dir and run:
cd mysql-5.5.8
cmake .
make
back to working dir and run:
CXX='gcc -static-libgcc' CC='gcc -static-libgcc' ./configure --with-mysql=mysql-5.5.8 --with-mysql-libservices=mysql-5.5.8/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