我用http://people.fsn.hu/~airween/mysql_auth/这个网址上的mysql_auth提供的作mysql认证,但是我在mysql_auth-0.5编译总是出错
gcc -I/usr/local/include -L/usr/local/lib -c src/mysql_auth.c
src/mysql_auth.c:24: mysql/mysql.h: No such file or directory
*** Error code 1
Stop in /tmp/mysql_auth-0.5.
这个错误是我在freebsd中编译得到的。
[root@squid mysql_auth-0.5]# make
gcc -I/usr/local/include -L/usr/local/lib -c -o src/mysql_auth.o src/mysql_auth.c
src/mysql_auth.c:24:25: mysql/mysql.h: No such file or directory
src/mysql_auth.c: In function `main':
src/mysql_auth.c:37: `MYSQL' undeclared (first use in this function)
src/mysql_auth.c:37: (Each undeclared identifier is reported only once
src/mysql_auth.c:37: for each function it appears in.)
src/mysql_auth.c:37: parse error before "connect"
src/mysql_auth.c:38: `MYSQL_RES' undeclared (first use in this function)
src/mysql_auth.c:38: `result' undeclared (first use in this function)
src/mysql_auth.c:39: `MYSQL_ROW' undeclared (first use in this function)
src/mysql_auth.c:39: parse error before "row"
src/mysql_auth.c:64: `connect' undeclared (first use in this function)
src/mysql_auth.c:188: `row' undeclared (first use in this function)
make: *** [src/mysql_auth.o] Error 1
这个错误是在redhat中得到的,那位大侠帮忙看看把
Make any changes to the source code you need. For example, set up correctly place of configuration file. See that in define.h.
Review the Makefile, and modify based on target platform or site requirements. Setting up the mysql.h header and libmysqlclients.a places. Setting up your squid user and group accounts, and squid root directory.
Setting up correctly the permissions of mysql_auth.conf (mode 600)!
This is very important! This file included a mysql account, with select, update, insert and delete privileges!
Also very important: if you use mysql.log, be very carefull! It contains all transactions! For example:
52 Query UPDATE data SET password = password ("1234") WHERE user LIKE 'airween'
After when you edit what you want, type 'make', then 'make install', then 'make clean'.
'Make install' will put 'mysql_auth' into /usr/local/squid/bin by default, and 'mysql_auth.conf' to /usr/local/squid/etc.
这段话是说明怎么安装的,我有些东西我看的不是很明白的,也希望那位可以详细解释一下。谢谢。