Thanks for reply.<br><font size="4">The startup message(in debug mode) on my machine:</font><br> <br> sql: safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"<br>rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
<br>rlm_sql (sql): Attempting to connect to root@localhost:/radius<br>rlm_sql (sql): starting 0<br>rlm_sql (sql): Attempting to connect rlm_sql_mysql #0<br>rlm_sql_mysql: Starting connect to MySQL server for #0<br>rlm_sql_mysql: Couldn't connect socket to MySQL server
root@localhost:radius<br>rlm_sql_mysql: Mysql error 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'<br>rlm_sql (sql): <span style="font-weight: bold;">Failed to connect DB handle #0
</span><br>rlm_sql (sql): starting 1<br>rlm_sql (sql): starting 2<br>rlm_sql (sql): starting 3<br>rlm_sql (sql): starting 4<br><font size="4">rlm_sql (sql): Failed to connect to any SQL server.</font><br>Module: Instantiated sql (sql)
<br><br><font size="4">The settings of sql.conf is like followings:<br><font size="2">sql {<br> driver = "rlm_sql_mysql"<br> server = "localhost"<br> login = "root"<br> password = "123"
<br><br> # Database table configuration<br> radius_db = "radius"<br><br> <br> acct_table1 = "radacct"<br> acct_table2 = "radacct"<br><br> # Allow for storing data after authentication
<br> postauth_table = "radpostauth"<br><br> authcheck_table = "radcheck"<br> authreply_table = "radreply"<br><br> groupcheck_table = "radgroupcheck"<br> groupreply_table = "radgroupreply"
<br><br> usergroup_table = "usergroup"<br><br> # Table to keep radius client info<br> nas_table = "nas"<br><br> # Remove stale session if checkrad does not see a double login
<br> deletestalesessions = yes<br> sqltrace = yes<br> sqltracefile = ${logdir}/sqltrace.sql<br><br> # number of sql connections to make to server<br> num_sql_socks = 5<br><br> # number of seconds to dely retrying on a failed database
<br> # connection (per_socket)<br> connect_failure_retry_delay = 60<br><br> <br> sql_user_name = "%{Stripped-User-Name:-%{User-Name:-DEFAULT}}"<br> sql_user_name = "%{User-Name}"
<br> authorize_check_query = "SELECT id, UserName, Attribute, Value, op \<br> FROM ${authcheck_table} \<br> WHERE Username = '%{SQL-User-Name}' \<br> ORDER BY id"<br> authorize_reply_query = "SELECT id, UserName, Attribute, Value, op \
<br> FROM ${authreply_table} \<br> WHERE Username = '%{SQL-User-Name}' \<br> ORDER BY id"<br><br> ......<br><br> Is anything wrong with the settings?<br><br></font>
</font><div><font size="2"><span class="gmail_quote">2007/1/28, Markus Krause <<a href="mailto:krause@biochem.mpg.de">krause@biochem.mpg.de</a>>:</span></font><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font size="2">Zitat von yao guoxian <<a href="mailto:yaoguoxian@gmail.com">yaoguoxian@gmail.com</a>>:<br><br>> Platform and Environment:<br>> Freeradius:1.0.5 on Redhat 9<br>> MySQL:MySQL-standard-5.0.20-linux
</font><font size="2">-i686<br>> Step:<br>> 1. create database radius;<br>> 2.mysql -uroot -prootpass radius < db_mysql.sql ;<br>> 3.Edit radiusd.conf and sql.conf;<br>> Debug Result:<br>> Nothing to do. Sleeping until we see a request.
<br>> rad_recv: Access-Request packet from host <a href="http://202.117.7.223:1490">202.117.7.223:1490</a>, id=6,<br>> length=47<br>> User-Name = "barney"<br>> CHAP-Password = 0xad35a90d409c25b78b6d148a5313
</font><font size="2">58d9ac<br>> Processing the authorize section of radiusd.conf<br>> modcall: entering group authorize for request 2<br>> modcall[authorize]: module "preprocess" returns ok for request 2
<br>> rlm_chap: Setting 'Auth-Type := CHAP'<br>> modcall[authorize]: module "chap" returns ok for request 2<br>> modcall[authorize]: module "mschap" returns noop for request 2<br>> rlm_realm: No '@' in User-Name = "barney", looking up realm NULL
<br>> rlm_realm: No such realm "NULL"<br>> modcall[authorize]: module "suffix" returns noop for request 2<br>> radius_xlat: 'barney'<br>> rlm_sql (sql): sql_set_user escaped user --> 'barney'
<br>> radius_xlat: 'SELECT id, UserName, Attribute, Value, op FROM<br>> radcheck WHERE Username = 'barney' ORDER BY id'<br>> rlm_sql (sql): Ignoring unconnected handle 4..
<br>> rlm_sql (sql): Ignoring unconnected handle 3..<br>> rlm_sql (sql): Ignoring unconnected handle 2..<br>> rlm_sql (sql): Ignoring unconnected handle 1..<br>> rlm_sql (sql): Ignoring unconnected handle 0..<br>
> rlm_sql (sql): There are no DB handles to use! skipped 5, tried to connect 0<br>> modcall[authorize]: module "sql" returns fail for request 2<br>> modcall: group authorize returns fail for request 2<br>
> Finished request 2<br>> Going to the next request<br>> --- Walking the entire request list ---<br>> Waking up in 6 seconds...<br>> rad_recv: Access-Request packet from host <a href="http://202.117.7.223:1490">
202.117.7.223:1490</a>, id=6,<br>> length=47<br>> Discarding duplicate request from client liv1:1490 - ID: 6<br>> --- Walking the entire request list ---<br>> Waking up in 2 seconds...<br>> --- Walking the entire request list ---
<br>> Cleaning up request 2 ID 6 with timestamp 45bca7cb<br>> Nothing to do. Sleeping until we see a request.<br>><br>> From the above results, I guess mysql doesnt work. But I can access<br>> databases from the command line .The Freeradius Server worked well when I
<br>> use the "user", not using MySQL.<br>> Any suggestion?<br><br>Did you double-check the settings in sql.conf? It seems that<br>freeradius can not connect to the mysql server.<br>The startup messages (in debug mode) at my installation has the lines:
<br><br> sql: safe-characters =<br>"@abcdefghijklmnopqrstuvwxyzAB</font><font size="2">CDEFGHIJKLMNOPQRSTUVWXYZ012345</font><font size="2">6789.-_: /"<br>rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
<br>rlm_sql (sql): Attempting to connect to radiusd@localhost:/radius<br>rlm_sql (sql): starting 0<br>rlm_sql (sql): Attempting to connect rlm_sql_mysql #0<br>rlm_sql_mysql: Starting connect to MySQL server for #0<br>rlm_sql (sql): Connected new DB handle, #0
<br>rlm_sql (sql): starting 1<br>rlm_sql (sql): Attempting to connect rlm_sql_mysql #1<br>rlm_sql_mysql: Starting connect to MySQL server for #1<br>rlm_sql (sql): Connected new DB handle, #1<br>rlm_sql (sql): starting 2<br>
rlm_sql (sql): Attempting to connect rlm_sql_mysql #2<br>rlm_sql_mysql: Starting connect to MySQL server for #2<br>rlm_sql (sql): Connected new DB handle, #2<br>rlm_sql (sql): starting 3<br>rlm_sql (sql): Attempting to connect rlm_sql_mysql #3
<br>rlm_sql_mysql: Starting connect to MySQL server for #3<br>rlm_sql (sql): Connected new DB handle, #3<br>rlm_sql (sql): starting 4<br>rlm_sql (sql): Attempting to connect rlm_sql_mysql #4<br>rlm_sql_mysql: Starting connect to MySQL server for #4
<br>rlm_sql (sql): Connected new DB handle, #4<br>Module: Instantiated sql (sql)<br><br>Do you see those?<br><br>Regards<br> markus</font><br><br><br>--<br>Markus Krause email: <a href="mailto:krause@biochem.mpg.de">
krause@biochem.mpg.de</a><br>Mogli-Soft: Support for Mac OS X, Webmail/Horde, LDAP, RADIUS<br>by order of the Computing Center of the Max-Planck-Institute of Biochemistry<br>Tel.: 089 - 89 40 85 99 Fax.: 089 - 89 40 85 98
<br><br>----------------------------------------------------------------------<br> This message was sent using <a href="https://webmail2.biochem.mpg.de">https://webmail2.biochem.mpg.de</a><br>If you encounter any problems please report to
<a href="mailto:rz-linux@biochem.mpg.de">rz-linux@biochem.mpg.de</a><br><br><br><br>-<br>List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html">http://www.freeradius.org/list/users.html</a>
<br></blockquote></div><br>