Sorry Scott, (forgot to CC: the list ;-)

Actually, the .sql file is pretty well self-documenting.  I setup mysql 
by creating a user (radius), a database (FREERADIUS), and giving that 
user full permissions to that database (substitute FREERADIUS for 
'radius' to use the default freeradius setup):
NOTE this is just my test setup, replace usernames, passwords, etc. to 
match your taste.

% mysql -u root -p
Password:
mysql>

Then run the following:

use mysql;
INSERT INTO user (Host, User, Password, Select_priv, Insert_priv, 
Update_priv, Delete_priv) VALUES ('%', 'radius@%', password('radius'), 
'N', 'N', 'N', 'N');
GRANT ALL on FREERADIUS.* TO "radius@%" IDENTIFIED BY "radius";
INSERT INTO db (Host, Db, User, Select_priv, Insert_priv, Update_priv, 
Delete_priv, Create_priv, Drop_priv, Grant_priv, References_priv, 
Index_priv, Alter_priv) values ('%', 'FREERADIUS', 'radius@%', 'Y', 'Y', 
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
CREATE DATABASE FREERADIUS;
exit

Refresh the grant tables:

% mysqladmin -u root -p reload
Password:

Then, as per the docs in 
./src/modules/rlm_sql/drivers/rlm_sql_mysql/db_mysql.sql:

% mysql -u radius -p FREERADIUS < 
./src/modules/rlm_sql/drivers/rlm_sql_mysql/db_mysql.sql
Password:

Then you can view the tables and columns in mysql:

% mysql -u radius -p FREERADIUS
Password:
mysql> show tables;
+----------------------+
| Tables_in_FREERADIUS |
+----------------------+
| dictionary           |
| nas                  |
| radacct              |
| radcheck             |
| radgroupcheck        |
| radgroupreply        |
| radreply             |
| realmgroup           |
| realms               |
| usergroup            |
+----------------------+
10 rows in set (0.00 sec)

mysql> show columns from usergroup;
+-----------+-------------+------+-----+---------+----------------+
| Field     | Type        | Null | Key | Default | Extra          |
+-----------+-------------+------+-----+---------+----------------+
| id        | int(10)     |      | PRI | NULL    | auto_increment |
| UserName  | varchar(30) |      | MUL |         |                |
| GroupName | varchar(30) | YES  |     | NULL    |                |
+-----------+-------------+------+-----+---------+----------------+
3 rows in set (0.00 sec)


That is more or less exactly how I was able to do it.
Hope this helps!

--Scott

On Tuesday, September 11, 2001, at 11:51 AM, Scott Bartlett wrote:

> [EMAIL PROTECTED] writes:
>> Wow, that was fast...
>
> I happened to be in the vicinity... I was reading/watching the list
> archive and you popped on the end...
>
>> I've been playing around with several other
>> radius packages to interface to mysql, so I'm sure I'll make it work.
>> If I can automate it, I'll post my script or commands to the list.
>
> Please do... my head's hurting from working it out... so far...
>
> Regards,
>
> SB

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to