<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 11/2/23 2:51 PM, Brendan Kearney
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:8e4f2fd3-67f6-5658-1855-1cbc9dc7de6f@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="moz-cite-prefix">On 11/2/23 2:49 PM, Francesco
Chemolli wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CA+Y8hcPKSg3-5zHVW+8bpn45x+gLYFXd=LHNoxbjfb0iSkDWpQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<div dir="ltr">
<div>Hi Robert,</div>
<div> are you sure that you have the required packages on
your system?</div>
<div>You'll need perl-DBD-MariaDB and what it depends on</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Nov 2, 2023 at
6:41 PM Brendan Kearney <<a
href="mailto:bpk678@gmail.com" moz-do-not-send="true"
class="moz-txt-link-freetext">bpk678@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">On 11/2/23 2:14 PM,
Robert 'Bobby' Zenz wrote:<br>
>>> Use of uninitialized value $DBI::errstr in
concatenation (.) or<br>
>>> string at /usr/lib64/squid/log_db_daemon line
403.<br>
>> You're trying to use an uninitialized variable when
outputting(?) the<br>
>> error message. Fix that first. I'm guessing you're
using the `errstr`<br>
>> function wrong there, see the official
documentation for hints:<br>
>> <a href="https://metacpan.org/pod/DBD::MariaDB"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://metacpan.org/pod/DBD::MariaDB</a><br>
>><br>
>>> Cannot connect to database: at
/usr/lib64/squid/log_db_daemon line<br>
>>> 403.<br>
>> And then you should see what error you're actually
getting here. My<br>
>> guess is that it will be a permission issue. User
not allowed to<br>
>> connect from this host, or process not allowed to
access the socket or<br>
>> something similar.<br>
> My apologies, I missed that that might not be a script
you've written.<br>
> I guess it is a ready-made script?<br>
> _______________________________________________<br>
> squid-users mailing list<br>
> <a href="mailto:squid-users@lists.squid-cache.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">squid-users@lists.squid-cache.org</a><br>
> <a
href="https://lists.squid-cache.org/listinfo/squid-users"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.squid-cache.org/listinfo/squid-users</a><br>
<br>
yes, this is the script packaged with squid from the fedora
repos. i <br>
will try to correct the script, which i believe may be
victim to newer <br>
syntax in an updated perl version or something like that.
we'll see <br>
what comes of it...<br>
<br>
thanks,<br>
<br>
brendan<br>
<br>
_______________________________________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">squid-users@lists.squid-cache.org</a><br>
<a href="https://lists.squid-cache.org/listinfo/squid-users"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.squid-cache.org/listinfo/squid-users</a><br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature"> Francesco</div>
</blockquote>
<p>got that...<br>
</p>
<p>[root@server3 bin]# rpm -qa |grep perl |grep -i maria</p>
perl-DBD-MariaDB-1.22-4.fc38.x86_64<br>
</blockquote>
<p>original script:</p>
<p># perform db connection<br>
my $dsn = "DBI:mysql:database=$database" . ($host ne "localhost" ?
":$host" : "");<br>
my $dbh;<br>
my $sth;<br>
eval {<br>
warn "Connecting... dsn='$dsn', username='$user',
password='...'";<br>
$dbh = DBI->connect($dsn, $user, $pass, { AutoCommit =>
1, RaiseError => 1, PrintError => 1 });<br>
};<br>
if ($EVAL_ERROR) {<br>
die "Cannot connect to database: $DBI::errstr";<br>
}</p>
<p>hacked up, but seemingly working, mods:</p>
<p># perform db connection<br>
# my $dsn = "DBI:mysql:database=$database" . ($host ne
"localhost" ? ":$host" : "");<br>
my $dsn = "DBI:MariaDB:database=$database;host=$host";<br>
my $dbh;<br>
my $sth;<br>
eval {<br>
# warn "Connecting... dsn='$dsn', username='$user',
password='...'";<br>
$dbh = DBI->connect($dsn, $user, $pass, { AutoCommit =>
1, RaiseError => 1, PrintError => 1 });<br>
};<br>
if ($EVAL_ERROR) {<br>
# die "Cannot connect to database: $DBI::errstr";<br>
die;<br>
}</p>
<p>i am by far not a developer, so i cannot say what should be in
the script. brute forcing it got me to the mods shown above.<br>
</p>
</body>
</html>