Connecting to Mysql database from plugins
Andreas Ericsson
ae at op5.se
Wed Jan 5 17:06:51 CET 2005
Jlnarayanan00 at aol.com wrote:
> Hi ,
> Our application is such that our plugin needs to connect to Mysql
> database to get the data.In the root directory of the linux server on which
> nagios is being installed we have the following files,
> MySQL-client-4.1.7-0.i386.rpm
> MySQL-devel-4.1.7-0.i386.rpm
> MySQL-server-4.1.7-0.i386.rpm
> MySQL-shared-compat-4.1.7-0.i386.rpm
You'll need to install those packages. Having them in the root directory
won't help anything at all (I'm assuming you're running an RPM-based
distribution of Linux).
> In the new plugin we tried, we have given the statement #include "mysql.h"
> (header file that contains the prototypes and variables required for MySQL).
> But while giving the "make all" command for the plugins we are getting an
> error as
> "mysql.h: No such file or directory".
>
> what are the steps we need to do to overcome this. Can any body help us in
> this issue.
>
If you've written that plugin yourselves and don't know how to overcome
this problem, I would seriously recommend purchasing professional help.
Incidentally, the short answer to your question would be to change
"mysql.h" to <mysql/mysql.h> (or possibly just <mysql.h>, depending on
where your system installs the header files).
If this is from the default plugin distribution, you should just
download the latest beta and re-run the ./configure script after having
installed MySQL-devel and all of its dependencies.
> Regards,
>
> Jaya
>
>
>
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Lead Developer
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list