I have gone through many information but none of them tells which file or conf are responsible for 2 independent sql instances. You use the sql.conf file in /etc/raddb - Make a copy of it, call it... sql-instance2.conf.
In sql-instance2.conf, modify the "sql {" line to say "sql sqlinst2 {"
Tweak it to fit your second instance.
In radiusd.conf, search for the line "$INCLUDE sql.conf" (it should be uncommented). Duplicate the line, change the second one to "$INCLUDE sql-instance2.conf".
In the second virtual server, instead of 'sql', use 'sqlinst2'.
That should do it.
:-)
Stefan Paetow
Dear Stefan, Thanks for your valuable hints. I follow your direction and I find that there are still other conf which may involve multiple sql instances. 1. In radiusd.conf, should I also duplicate each of this for a separate sql instance? $INCLUDE sql/mysql/counter.conf $INCLUDE sqlippool.conf 2. In file sql/mysql/counter.conf, there are lines sqlcounter dailycounter { sqlmod-inst = sql } So do I have to replace the sql entry with sqlinst2 etc? 3. In file sqlippool.conf, there are lines sqlippool { sql-instance-name = "sql" } So do I have to replace this with sqlinst2 etc? 4. In the sites-available/default or virtual-server file, there is an entry sqlippool How should I handle this to match a multiple mysql instances scenario? Yours Faithfully, Timmy