LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Snort init errors mysql logging (https://www.linuxquestions.org/questions/linux-software-2/snort-init-errors-mysql-logging-864567/)

tbaror 02-23-2011 11:28 AM

Snort init errors mysql logging
 
Hello All,

I have just complied Snort 2.9.0.4 under Ubuntu 10.10 x86_64 installed with all Lamp package.
The syntax i used to compile Snort as follows below
*********************************************
~/snort-2.9.0.4# ./configure -with-mysql —prefix=/usr/local/snort —enable-ipv6 —enable-gre \-enable-mpls -enable-targetbased —enable-decoder-preprocessor-rules \-enable-ppm -enable-perfprofiling —enable-zlib —enable-active-response \-enable-normalizer —enable-reload —enable-react —enable-flexresp3
***********************************************
in snort.conf i set log as follow
********************************************************************
output database: log, mysql, user=snort password=password dbname=snort host=localhost sensor_name=gfn-sec-sn1
********************************************************************

now when i run snort " /usr/local/snort/bin/snort -c /etc/snort/snort.conf -i eth2"

I get following error
************************************************************
Log directory = /var/log/snort
database: ‘mysql’ support is not compiled into this build of snort

ERROR: If this build of snort was obtained as a binary distribution (e.g., rpm,
or Windows), then check for alternate builds that contains the necessary
‘mysql’ support.

If this build of snort was compiled by you, then re-run the
the ./configure script using the ‘—with-mysql’ switch.
For non-standard installations of a database, the ‘—with-mysql=DIR’
syntax may need to be used to specify the base directory of the DB install.

See the database documentation for cursory details (doc/README.database).
and the URL to the most recent database plugin documentation.
Fatal Error, Quitting..
************************************************************

Since i am not so expert with Linux should i point somewhere for MySQL or i missed something.

Please Advice

Thanks

Noway2 02-23-2011 11:34 AM

Quote:

./configure -with-mysql
If you copied your configure statement as you entered it, you are missing a - in the line. It should read --with-mysql.

unixfool 02-23-2011 12:12 PM

Quote:

Originally Posted by Noway2 (Post 4268699)
If you copied your configure statement as you entered it, you are missing a - in the line. It should read --with-mysql.

Yep...I just saw that, too. Good catch there.

In fact, half of his options are using '-' instead of '--'.

tbaror 02-23-2011 01:05 PM

Thanks all
i noticed that but i rechecked again and its with double dash "--with " so the issue is not that
any knows how i can determine mysql path with Ubuntu 10.10 64

Thanks

unixfool 02-23-2011 01:26 PM

Quote:

Originally Posted by tbaror (Post 4268799)
Thanks all
i noticed that but i rechecked again and its with double dash "--with " so the issue is not that
any knows how i can determine mysql path with Ubuntu 10.10 64

Thanks

Uhmmm...yeah, the issue IS that.


The reason you can't start Snort with mysql reporting enabled within the config file is because you never built the binary to support mysql. The error message supports this:

Your said:

Quote:

I get following error
************************************************************
Log directory = /var/log/snort
database: ‘mysql’ support is not compiled into this build of snort
Trust me...I've been there, AND the compile command you showed earlier shows that you didn't compile the binary correctly.

This is what you used:

Quote:

./configure -with-mysql —prefix=/usr/local/snort —enable-ipv6 —enable-gre \-enable-mpls -enable-targetbased —enable-decoder-preprocessor-rules \-enable-ppm -enable-perfprofiling —enable-zlib —enable-active-response \-enable-normalizer —enable-reload —enable-react —enable-flexresp3
This is what it should be:

Quote:

./configure --with-mysql
The others need to also be fixed:

Quote:

--prefix=/usr/local/snort --enable-ipv6 --enable-gre --enable-mpls --enable-targetbased --enable-decoder-preprocessor-rules --enable-ppm --enable-perfprofiling --enable-zlib --enable-active-response --enable-normalizer --enable-reload --enable-react --enable-flexresp3
To find out the proper options, use ./configure --help

unSpawn 02-23-2011 03:59 PM

Moved: This thread is more suitable in the Software forum and has been moved accordingly to help your thread/question get the exposure it deserves.


All times are GMT -5. The time now is 01:31 AM.