[squid-users] squid authentication to remote sql server

Ahmad ahmed.zaeem at netstream.ps
Wed Feb 11 07:17:38 UTC 2015


Thank you amos , I fixed the table thing , but I have new error now :

/lib/squid/basic_db_auth --dsn "DBI:mysql:host=x.xx..189.177;port=3306;database=squid" --user "squid" --password "squid" --table "passwd" --usercol "user" --passwdcol "password" --cond "" --plaintext

ERR unknown login
ERR unknown login
ERR unknown login
ERR unknown login
ERR unknown login


Wt do u think ??
Mysql issue ?


-----Original Message-----
From: Amos Jeffries [mailto:squid3 at treenet.co.nz] 
Sent: Tuesday, February 10, 2015 12:42 PM
To: Ahmad; squid-users at lists.squid-cache.org
Subject: Re: [squid-users] squid authentication to remote sql server

Replying again because I missed the --table parameter value earlier.


On 11/02/2015 7:24 p.m., Ahmad wrote:
> Thank you amos , but I have an issue with connection :


> mysql> select * from  passwd;


===> notice the TABLE NAME.

> +--------+----------+---------+-----------+---------------------+
> | user   | password | enabled | fullname  | comment             |
> +--------+----------+---------+-----------+---------------------+
> | Nikesh | test     |       1 | Test User | for testing purpose |
> +--------+----------+---------+-----------+---------------------+
> 1 row in set (0.00 sec)
> 

> 
> now on the squid box , I do the conection below :
> 
> here is the connection from remote squid:
> /lib/squid/basic_db_auth --dsn 
> "DBI:mysql:database=squid:host=x.x189.177" \

blah. blah about semi-colons from both of my earlier posts..


> --user "squid" --password "squid" --table "user"

==>  notice the TABLE NAME

> --usercol "user" --passwdcol "password" 


> --cond "" --plaintext
> 

You have an "enabled" column in the table for disabling peoples accounts. The default --cond is fine.

> 
> DBD::mysql::st execute failed: Table 'squid.user' doesn't exist at /lib/squid/basic_db_auth line 215, <> line 1.
> DBD::mysql::st execute failed: MySQL server has gone away at /lib/squid/basic_db_auth line 218, <> line 1.
> ERR database error

Because TABLE NAME.

Amos



More information about the squid-users mailing list