Freeradius2 & Mysql

Tim Sylvester tim.sylvester at networkradius.com
Thu Sep 9 07:14:30 CEST 2010


 [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 (
<http://dev.mysql.com/doc/refman/5.1/en/error-messages-server.html#error_er_
no_such_table> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20100908/b9e0e19d/attachment.html>


More information about the Freeradius-Users mailing list