mysqlubuntufreeradius

Multiple databases on the same freeradius


I am wondering if there are any way to use two different databases within the same freeradius instance?

ubuntu 22.04

freeradius 3.0

mysql 8.0


Solution

  • describe your scenario in details

    $ cd /etc/freeradius/3.0/mods-enabled
    $ cp ../mods-available/sql ../mods-available/sql1
    $ cp ../mods-available/sql ../mods-available/sql2
    $ ln -s ../mods-available/sql1 sql1
    $ ln -s ../mods-available/sql2 sql2
    
    $ nano ../mods-available/sql1
    sql sql1 {
            group_attribute = "${.:instance}-SQL-Group"
    #       group_attribute = "SQL-Group"
    }
    
    $ nano ../mods-available/sql2
    sql sql2 {
            group_attribute = "${.:instance}-SQL-Group"
    #       group_attribute = "SQL-Group"
    }
    
    $ nano ../sites-available/default
    authorize {
    #       -sql
            redundant-load-balance sql {
                    sql1
                    sql2
            }
    }