How to connect to backend DB

Peter Nixon listuser at peternixon.net
Fri Jun 8 07:08:15 CEST 2007


But you asked if there was:

"some standard method that may be used to connect and fetch data from the 
MYSQL database?"

The answer is:

Look at rlm_sql, rlm_sqlippool or any of the other modules that use SQL..

-Peter

On Fri 08 Jun 2007, Nitin Naveen wrote:
> Hi Peter,
>
> I did bother to look at rlm_sql. However my need is a bit different. I do
> not
> want to fetch values from a DB and added them as values to certain radisu
> attributes.
> I want to fetch, do some operation on the feteched value and then add the
> result
> of the operation to the radius attributes. Any ideas or suggested steps
> would be
> helpful.
>
> Regards
> Nitin
>
> Date: Thu, 7 Jun 2007 11:12:47 +0300
> From: Peter Nixon <listuser at peternixon.net>
> Subject: Re: How to connect to backend DB
> To: FreeRadius users mailing list
>                  <freeradius-users at lists.freeradius.org>
> Message-ID: <200706071112.48377.listuser at peternixon.net>
> Content-Type: text/plain;  charset="iso-8859-9"
>
> On Thu 07 Jun 2007, Nitin Naveen wrote:
> > Hi,
> >
> > I am writing a new RLM called rlm_prop_protocol. It basically adds some
> > attributes. The value for
> > these attributes are pulled from a backend database (MYSQL). I wanted to
> > know whether there
> > is a provision in freeradius or some standard method that may be used to
> > connect and fetch
> > data from the MYSQL database. As of now I have added MYSQL specific code
> > in my module.
>
> Did you bother to look at the FreeRADIUS code before you started writing??
>
> The modules rlm_sql and rlm_sql_mysql would seem to be pretty self
> explanatory :-)
>
> It is quite likely that you can do what you need without writing a new
> module...
>
> Cheers



-- 

Peter Nixon
http://www.peternixon.net/
PGP Key: http://www.peternixon.net/public.asc



More information about the Freeradius-Users mailing list