[squid-users] Can't store log in mysql 8.0 database

Amos Jeffries squid3 at treenet.co.nz
Sat Mar 4 12:23:54 UTC 2023


On 4/03/2023 8:22 am, Francisco wrote:
> Hi, I\m trying to store logs in a mysql server 8.0 database from squid 
> 5.7 in Debian 11.
>
> My idea is store all logs in /var/log/squid/ dir, and logs from 
> specifics urls, domains and sites store in mysql database 
> ('access_log_internet' table) to restrict those users that overcuote 
> an specific amount of MB.
>
>
> *The config:*
> /access_log /var/log/squid/nav_basica-access.log squid dominios/
> /access_log /var/log/squid/nav_basica-access.log squid dominios_parciales
> /
> /access_log /var/log/squid/nav_basica-access.log squid sitios
> /
> /access_log /var/log/squid/nav_basica-access.log squid dominio_cu/
> /access_log /var/log/squid/internet-access.log squid !dominios 
> !dominios_parciales !sitios !dominio_cu/
>
> /logfile_daemon /usr/lib/squid/log_db_daemon/
> /access_log 
> daemon:/192.168.56.2:3306/squidmgr/access_log_internet/squidmgr/squidmgrsquid 
> <http://192.168.56.2:3306/squidmgr/access_log_internet/squidmgr/squidmgrsquid> 
> !dominios !dominios_parciales !sitios !dominio_cu/
>
> when try start squid, it's fail:
>
> /Dec 31 19:00:00 1969Use of uninitialized value $DBI::errstr in 
> concatenation (.) or string at /usr/lib/squid/log_db_daemon line 403.
> Dec 31 19:00:00 1969Cannot connect to database:  at 
> /usr/lib/squid/log_db_daemon line 403.
> /

What version of Perl do you have on this machine?

Do you have both libdbd-mysql-perl and libdbi-perl packages installed?


Cheers
Amos


More information about the squid-users mailing list