Cannot increase open file descriptors above 1024

Nick Porter nick at portercomputing.co.uk
Fri Nov 18 10:52:15 UTC 2022


On 18/11/2022 08:45, Ibrahemoo Ghost wrote:
> I could not share the connection pool across sql instances because it
> shared a single connection to a single database, What I want is to have
> each sql instance connect to a different database (Under the same mysql
> server).

If the databases are all on the same MySQL server, then you could simply 
ensure that the user you are connecting to the server as has appropriate 
permissions for all the databases and the amend your queries to prefix 
the table name with <databasename>. - MySQL allows queries to cross 
databases on the same host.

E.g.

SELECT id, username, attribute, value, op FROM db1.radcheck WHERE 
username = '%{SQL-User-Name}' ORDER BY id

you could even make the database name a dynamic expansion

SELECT id, username, attribute, value, op FROM 
%{control:Local-Database}.radcheck WHERE username = '%{SQL-User-Name}' 
ORDER BY id

where Local-Database is an attribute you define in your local dictionary 
and populate in your policy before calling the SQL module.

-- 
Nick Porter

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 665 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20221118/60b1349e/attachment.sig>


More information about the Freeradius-Users mailing list