Using multiple databases on the same freeRadius instance
Gabriel Marais
gabriel.j.marais at gmail.com
Wed Feb 15 13:50:06 CET 2017
On 2017/02/15 2:36 PM, Alan DeKok wrote:
> On Feb 15, 2017, at 7:34 AM, Gabriel Marais <gabriel.j.marais at gmail.com> wrote:
>>
>> My DB Connections file looks like :-
>> sql_admin_db {
>
> That's wrong. Please follow the examples
>
> You need to use:
>
> sql sql_admin_db {
Changed my sql connection file to :-
sql sql_admin_db {
database = "mysql"
driver = "rlm_sql_${database}"
server = "localhost"
login = "radius"
My queries still looks like:-
if(Acct-Status-Type == Start){
update proxy-request {
subscriberID += "%{sql_admin_db:SELECT
account_name FROM app_dslaccount WHERE account_name = '%{User-Name}'}"
productID += "%{sql_admin_db:SELECT
current_product_id FROM app_dslaccount WHERE account_name = '%{User-Name}'}"
Error in debug:-
Wed Feb 15 14:47:04 2017 : Info: WARNING: Unknown module "sql_admin_db"
in string expansion "%"
Wed Feb 15 14:47:04 2017 : Info: WARNING: Unknown module "sql_admin_db"
in string expansion "%"
>
> Which means "use the SQL module, but we're making a variant of it, called sql_admin_db"
>
> Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
--
Regards
Gabriel Marais
Office: +27 861 466 546 x 7001
Mobile: +27 83 663 2222
Mail: gabriel.j.marais at gmail.com
Unit 11, Ground Floor, Berkley Office Park
Cnr Bauhinia & Witch Hazel Str,
Highveld, Centurion, South-Africa
0157
PO Box 15846, Lyttelton, South Africa, 0140
More information about the Freeradius-Users
mailing list