Compiling with MySQL support on latest ossec-wazuh version.

1,757 views
Skip to first unread message

Mike Steffen

unread,
Jun 20, 2016, 3:53:33 PM6/20/16
to Wazuh mailing list
I've been beating my head against the wall trying to get the latest version of the Wazuh fork to compile with MySQL support.  The new Makefile bit seems to go fine, I get the proper output during BOTH the Make process and the installation.  But when I launch Ossec, I still get "ossec-dbd(5207): ERROR: OSSEC not compiled with support for 'mysql'"

Has anybody gotten this to work?
Message has been deleted

Mike Steffen

unread,
Jun 20, 2016, 5:04:58 PM6/20/16
to Wazuh mailing list
It's was a PEBKAC error. 

I ran "../install.sh" when I should've run "make install-server" step.  Running the normal install.sh ignored everything I did with the Makefile.

ID10T

Victor Fernandez

unread,
Jun 20, 2016, 7:02:37 PM6/20/16
to Wazuh mailing list
Hi Mike.

The install.sh script has not suport for databases at the moment. In order to compile OSSEC with MySQL support, you should install the development libraries (package libmysqlclient-dev on Debian) and run make:

make TARGET=server DATABASE=mysql install

Then, enable the database daemon:

/var/ossec/bin/ossec-control enable database

After setting the configuration, restart OSSEC:

/var/ossec/bin/ossec-control restart

Kind regards.

Mike Steffen

unread,
Jun 24, 2016, 3:02:39 PM6/24/16
to Wazuh mailing list
Thanks Victor.

I realize that use of indexing and JSON queries is supposed to be phasing out databases with OSSEC, but it would be nice if these instructions were posted somewhere on either the OSSEC or Wazuh sites.  The only instructions I was able to find was the old pre 2.9 make setdb method of compiling OSSEC with MySQL.

Thanks for the help.
Reply all
Reply to author
Forward
0 new messages