Add mods-available/enabled
[freeradius.git] / raddb / mods-available / sql
1 # -*- text -*-
2 ##
3 ## sql.conf -- SQL modules
4 ##
5 ##      $Id$
6
7 ######################################################################
8 #
9 #  Configuration for the SQL module
10 #
11 #  The database schemas and queries are located in subdirectories:
12 #
13 #       sql/DB/schema.sql       Schema
14 #       sql/DB/dialup.conf      Basic dialup (including policy) queries
15 #       sql/DB/counter.conf     counter
16 #       sql/DB/ippool.conf      IP Pools in SQL
17 #       sql/DB/ippool.sql       schema for IP pools.
18 #
19 #  Where "DB" is mysql, mssql, oracle, or postgresql.
20 #
21
22 sql {
23         #
24         #  Set the database to one of:
25         #
26         #       mysql, mssql, oracle, postgresql
27         #
28         database = "mysql"
29
30         #
31         #  Which FreeRADIUS driver to use.
32         #
33         driver = "rlm_sql_${database}"
34
35         # Connection info:
36         server = "localhost"
37         #port = 3306
38         login = "radius"
39         password = "radpass"
40
41         # Database table configuration for everything except Oracle
42         radius_db = "radius"
43         # If you are using Oracle then use this instead
44         # radius_db = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=your_sid)))"
45
46         # If you want both stop and start records logged to the
47         # same SQL table, leave this as is.  If you want them in
48         # different tables, put the start table in acct_table1
49         # and stop table in acct_table2
50         acct_table1 = "radacct"
51         acct_table2 = "radacct"
52
53         # Allow for storing data after authentication
54         postauth_table = "radpostauth"
55
56         authcheck_table = "radcheck"
57         authreply_table = "radreply"
58
59         groupcheck_table = "radgroupcheck"
60         groupreply_table = "radgroupreply"
61
62         # Table to keep group info
63         usergroup_table = "radusergroup"
64
65         # If set to 'yes' (default) we read the group tables
66         # If set to 'no' the user MUST have Fall-Through = Yes in the radreply table
67         # read_groups = yes
68
69         # Remove stale session if checkrad does not see a double login
70         deletestalesessions = yes
71
72         # Print all SQL statements when in debug mode (-x)
73         sqltrace = no
74         sqltracefile = ${logdir}/sqltrace.sql
75
76         #  As of version 3.0, the "pool" section has replaced the
77         #  following configuration items:
78         #
79         #  num_sql_socks
80         #  connect_failure_retry_delay
81         #  lifetime
82         #  max_queries
83
84         pool {
85                 # Number of connections to start
86                 start = 5
87
88                 # Minimum number of connections to keep open
89                 min = 4
90
91                 # Maximum number of connections
92                 max = 10
93
94                 # Spare connections to be left idle
95                 spare = 3
96
97                 # Number of uses before the connection is closed
98                 #
99                 # 0 means "infinite"
100                 uses = 0
101
102                 # The lifetime (in seconds) of the connection
103                 lifetime = 0
104
105                 # idle timeout (in seconds).  A connection which is
106                 # unused for this length of time will be closed.
107                 idle_timeout = 60
108         }
109
110         # Set to 'yes' to read radius clients from the database ('nas' table)
111         # Clients will ONLY be read on server startup.  For performance
112         # and security reasons, finding clients via SQL queries CANNOT
113         # be done "live" while the server is running.
114         # 
115         #readclients = yes
116
117         # Table to keep radius client info
118         nas_table = "nas"
119
120         # Read driver-specific configuration
121         $INCLUDE sql/${database}/dialup.conf
122 }