Use the socket method. If you don't know where the socket file is try: find / -name mysql.sock It will probably be in /tmp if it isn't in /var/lib/mysql regards Frank Ranner ________________________________ From: freeradius-users-bounces+frank.ranner=defence.gov.au@lists.freeradius.or g [mailto:freeradius-users-bounces+frank.ranner=defence.gov.au@lists.freer adius.org] On Behalf Of yao guoxian Sent: Monday, 29 January 2007 15:14 To: edvin.seferovic@kolp.at; FreeRadius users mailing list Subject: Re: Why Freeradius and Mysql dont work? Thanks again. The file "/var/lib/mysql/mysql.sock" does not exist.When I use an IP in sql.conf instead of the "localhost", I get the following result: rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked rlm_sql (sql): Attempting to connect to root@202.117.X.X:/radius rlm_sql (sql): starting 0 rlm_sql (sql): Attempting to connect rlm_sql_mysql #0 rlm_sql_mysql: Starting connect to MySQL server for #0 rlm_sql_mysql: Couldn't connect socket to MySQL server root@202.117.7.243:radius rlm_sql_mysql: Mysql error 'Host '202.117.7.243' is not allowed to connect to this MySQL server' rlm_sql (sql): Failed to connect DB handle #0 rlm_sql (sql): starting 1 rlm_sql (sql): starting 2 rlm_sql (sql): starting 3 rlm_sql (sql): starting 4 rlm_sql (sql): Failed to connect to any SQL server. Module: Instantiated sql (sql) 2007/1/29, Edvin Seferovic <edvin.seferovic@kolp.at>: rlm_sql_mysql: Mysql error 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' rlm_sql (sql): Failed to connect DB handle #0 rlm_sql (sql): Failed to connect to any SQL server. your socket file is not in the place.. maybe you should use an IP in your sql.conf instead of the "localhost" ! Regards, E:S - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html