[squid-users] squid authentication to remote sql server

Amos Jeffries squid3 at treenet.co.nz
Tue Feb 10 00:15:24 UTC 2015


On 10/02/2015 5:01 p.m., Ahmad wrote:
> Hi , 
> 
> I followed the article in  :
> 
> http://wiki.squid-cache.org/ConfigExamples/Authenticate/Mysql
> 
>  
> 
>  
> 
> I need to connect  squid to external sql server  , what do I need to modify
> in the helper command ?
> 
>  
> 
> I think that the command below :
> 
> ""auth_param basic program /usr/local/squid/libexec/squid_db_auth --user
> someuser --password xxxx --plaintext --persist
> 
>  
> 
> Shoud include the ip  & port of the sql server .
> 

The Data Source Name (--dsn) parameter is the option string passed to
the Perl DBI module for locating the database to use.

It takes the syntax:

  "DSN:" driver ":" params

The params bit depends on what database driver (type) is. The "mysql"
driver uses semi-colon separated key=value pairs.

So you can write something like:

  --dsn "DSN:mysql:host=example.com;port=3306;database=squid"


Amos


More information about the squid-users mailing list