Freeradius2 & Mysql

C.J. Adams-Collier KF7BMP cjac at colliertech.org
Thu Sep 9 07:20:59 CEST 2010


On Wed, 2010-09-08 at 22:14 -0700, Tim Sylvester wrote:
>  [sql]   expand: %{User-Name} -> fredf
> [sql] sql_set_user escaped user --> 'fredf'
> rlm_sql (sql): Reserving sql socket id: 4
> [sql]   expand: SELECT id, username, attribute, value, op
> FROM radcheck           WHERE username = '%{SQL-User-Name}'
> ORDER BY id -> SELECT id, username, attribute, value, op
> FROM radcheck           WHERE username = 'fredf'           ORDER BY id
> [sql] User found in radcheck table
> [sql]   expand: SELECT id, username, attribute, value, op
> FROM radreply           WHERE username = '%{SQL-User-Name}'
> ORDER BY id -> SELECT id, username, attribute, value, op
> FROM radreply           WHERE username = 'fredf'           ORDER BY id
> [sql]   expand: SELECT groupname           FROM radusergroup
> WHERE username = '%{SQL-User-Name}'           ORDER BY priority ->
> SELECT groupname           FROM radusergroup           WHERE username
> = 'fredf'           ORDER BY priority
> [sql]   expand: SELECT id, groupname, attribute,           Value, op
> FROM radgroupcheck           WHERE groupname = '%{Sql-Group}'
> ORDER BY id -> SELECT id, groupname, attribute,           Value, op
> FROM radgroupcheck           WHERE groupname = 'dynamic'
> ORDER BY id
> rlm_sql_mysql: MYSQL check_error: 1146 received
> rlm_sql_getvpdata: database query error
> [sql] Error retrieving check pairs for group dynamic
> [sql] Error processing groups; rejecting user
> rlm_sql (sql): Released sql socket id: 4
> ++[sql] returns fail
> 
> 
> 
> <tim>
> 
>  
> 
> From the MySQL documentation:
> 
> Error: 1146 SQLSTATE:42S02 (ER_NO_SUCH_TABLE) Message: Table '%s.%s'
> doesn't exist 
> 
> Use the MySQL client with the same user that FreeRADIUS uses to
> connect to MySQL. Then try the query that FR sent to MySQL:
> 
>  
> 
> SELECT id, groupname, attribute, Value, op  FROM radgroupcheck WHERE
> groupname = 'dynamic' ORDER BY id;
> 
>  
> 
> You should get the same error – 1146 and message with more information
> on the error.
> 
>  
> 
> Tim


Sounds like you haven't created the table in your MySQL DB yet.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20100908/1b9d7434/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20100908/1b9d7434/attachment.pgp>


More information about the Freeradius-Users mailing list