Both mysql servers are working! I test it on a single db radius config.
I do this in radiusd.conf
$INCLUDE ${confdir}/sql1.conf # sql sql1 { server 1 options }
$INCLUDE ${confdir}/sql2.conf sql sql2 { server 2 options }authorize {
redundant {
sql1
sql2
notfound = return
}
}accounting {
redundant {
sql1
sql2
}
}See the time on radius.log
Fri Jan 28 17:21:10 2005 : Info: rlm_sql (sql1): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
Fri Jan 28 17:21:10 2005 : Info: rlm_sql (sql1): Attempting to connect to [EMAIL PROTECTED]:/db
Fri Jan 28 17:21:10 2005 : Info: rlm_sql_mysql: Starting connect to MySQL server for #0
Fri Jan 28 17:24:19 2005 : Error: rlm_sql_mysql: Couldn't connect socket to MySQL server [EMAIL PROTECTED]:db
Fri Jan 28 17:24:19 2005 : Error: rlm_sql_mysql: Mysql error 'Can't connect to MySQL server on '192.168.160.10' (110)'
Fri Jan 28 17:24:19 2005 : Error: rlm_sql (sql1): Failed to connect DB handle #0
Fri Jan 28 17:24:19 2005 : Info: rlm_sql (sql2): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
Fri Jan 28 17:24:19 2005 : Info: rlm_sql (sql2): Attempting to connect to [EMAIL PROTECTED]:/westwireless
----- Original Message ----- From: "Dustin Doris" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, January 28, 2005 4:32 PM
Subject: Re: Have anyone a good example failover mysql config?
Hello Freeradius users,
Have anyone a good example of failover mysql config (radiusd.conf)?
I want to use SQL1, if it's down, try SQL2.
I reed the configurable_failover document but it don't work, or not understanding.
If now one of my mysql server go down, radius server work slow and failt many times to login.
Please help me...
Read doc/configurable_failover, it will show you how.
I'm doing it with ldap, but it should be pretty much the same. First, make sure you have two sql configurations. So, in sql.conf, change this
sql {
to this
sql sql1 {
then at the end of the file, start a new one and name it something else, like this
sql sql2 { copy all the stuff from sql1 here and modify to point to the other server } #don't forget to close it with this
Then in raidusd.conf use configurable_failover options.
Here is how I do it with ldap
authorize { stuff... redundant { ldap1 ldap2 notfound = return } }
I imaging you would just change that to something like
redundant { sql1 sql2 }
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

