FR3 and MySQL

Fernando Pizarro feanpg at gmail.com
Tue Jul 7 14:43:17 CEST 2015



El 07/07/15 a las 14:36, Andrés Gómez escribió:
> Hi everybody!!
>
> Today I'm testing FR3 in order to migrate some simple FR2 servers.
> In old servers is running a simple configuration usng mysql to match
> username/password with a simple web auth (captive portal).
>
> I installed FR3, then I actived sql mod:
>
> cd mods-enabled
> ln -s ../mods-available/sql
>
> then I configured the sql connection:
>
> sql {
>          driver = "rlm_sql_mysql"
>          server = "localhost"
>          port = 3306
>          login = "MYUSER"
>          password = "MYPASSWORD"
>          radius_db = "radius"
>          acct_table1 = "radacct"
>          acct_table2 = "radacct"
>          postauth_table = "radpostauth"
>          authcheck_table = "radcheck"
>          groupcheck_table = "radgroupcheck"
>          authreply_table = "radreply"
>          groupreply_table = "radgroupreply"
>          usergroup_table = "radusergroup"
>          delete_stale_sessions = yes
> ...
> }
>
> I'm using the same schema that I used to use in FR2.
>
> I created and user in radcheck table, and It works, but I cant write
> accounting data. There is this error:
>
>
> Tue Jul  7 07:23:06 2015 : Auth: (0) Login OK: [andres/andres] (from client
> todos port 0)
> Tue Jul  7 07:23:06 2015 : Error: rlm_sql (sql): Unknown column 'username'
> in 'field list'
> Tue Jul  7 07:23:06 2015 : Error: rlm_sql_mysql: Cannot store result
> Tue Jul  7 07:23:06 2015 : Error: rlm_sql_mysql: MySQL error 'Unknown
> column 'username' in 'field list''
> Tue Jul  7 07:23:27 2015 : Error: rlm_sql (sql): Unknown column
> 'acctupdatetime' in 'field list'
> Tue Jul  7 07:23:27 2015 : Error: rlm_sql_mysql: Cannot store result
> Tue Jul  7 07:23:27 2015 : Error: rlm_sql_mysql: MySQL error 'Unknown
> column 'acctupdatetime' in 'field list''
> Tue Jul  7 07:23:27 2015 : Error: rlm_sql (sql): Unknown column
> 'acctupdatetime' in 'field list'
> Tue Jul  7 07:23:27 2015 : Error: rlm_sql_mysql: Cannot store result
> Tue Jul  7 07:23:27 2015 : Error: rlm_sql_mysql: MySQL error 'Unknown
> column 'acctupdatetime' in 'field list''
> Tue Jul  7 07:23:41 2015 : Error: rlm_sql (sql): Unknown column
> 'acctupdatetime' in 'field list'
> Tue Jul  7 07:23:41 2015 : Error: rlm_sql_mysql: Cannot store result
> Tue Jul  7 07:23:41 2015 : Error: rlm_sql_mysql: MySQL error 'Unknown
> column 'acctupdatetime' in 'field list''
> Tue Jul  7 07:23:41 2015 : Error: rlm_sql (sql): Unknown column
> 'acctupdatetime' in 'field list'
> Tue Jul  7 07:23:41 2015 : Error: rlm_sql_mysql: Cannot store result
> Tue Jul  7 07:23:41 2015 : Error: rlm_sql_mysql: MySQL error 'Unknown
> column 'acctupdatetime' in 'field list''
> Tue Jul  7 07:23:41 2015 : Info: rlm_sql (sql): Closing connection (0),
> from 1 unused connections
> Tue Jul  7 07:23:47 2015 : Error: rlm_sql (sql): Unknown column
> 'acctupdatetime' in 'field list'
> Tue Jul  7 07:23:47 2015 : Error: rlm_sql_mysql: Cannot store result
> Tue Jul  7 07:23:47 2015 : Error: rlm_sql_mysql: MySQL error 'Unknown
> column 'acctupdatetime' in 'field list''
>
> What am I missing?
>
> Thanks a lot!!
>
>
Hi!

Don't use FreeRADIUS v2 schema, username and acctupdatetime columns 
doesn't work.

In mods-config/sql/main there is a folder with schema.sql, setup.sql 
(old admin.sql in v2) and queries.conf files for MySQL databases.

Regards.


More information about the Freeradius-Users mailing list