You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Jordi <jo...@cebria.info> on 2007/08/10 11:01:36 UTC
SPAMD & Mysql & non standard Port
Hi,
Anybody is using SPAMASSASSIN with MYSQL to store scores, AWL or Bayes
information in a different port than the standard one 3306?
I try to use the 3308 because I have another mysql in 3306 and the SPAMD
don't take the information of the local.cf file
user_scores_dsn DBI:mysql:spamassassin:localhost:3308
That is the message:
Aug 10 10:30:54 xxxx spamd[25901]: config: failed to load user (jordi)
scores from SQL database: config: SQL error: Can't connect to local MySQL
server through socket '/tmp/mysql.sock' (2)
Aug 10 10:30:54 xxxx spamd[25901]: spamd: service unavailable: Error
fetching user preferences via SQL at /usr/bin/spamd line 1995, <GEN23> line
2.
Mysql is running on port 3308 and using "/tmp/mysql2.sock" and NOT the
"/tmp/mysql.sock"
I try with spamassassin 3.2.0, 3.2.1 and now with 3.2.3
Thanks,
--
View this message in context: http://www.nabble.com/SPAMD---Mysql---non-standard-Port-tf4247476.html#a12087734
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.
Re: SPAMD & Mysql & non standard Port
Posted by Erik Wasser <er...@iquer.net>.
On Friday 10 August 2007 14:44, Per Jessen wrote:
> When you specify host=localhost to a mysql client, it will always try
> to use the socket interface instead. I think that is probably what
> is happening.
Specifing '127.0.0.1' instead of 'localhost' will prevent this.
With '127.0.0.1' a TCP/IP connection will be used.
--
So long... Fuzz
Re: SPAMD & Mysql & non standard Port
Posted by Per Jessen <pe...@computer.org>.
Jordi wrote:
> Aug 10 10:30:54 xxxx spamd[25901]: config: failed to load user (jordi)
> scores from SQL database: config: SQL error: Can't connect to local
> MySQL server through socket '/tmp/mysql.sock' (2)
> Aug 10 10:30:54 xxxx spamd[25901]: spamd: service unavailable: Error
> fetching user preferences via SQL at /usr/bin/spamd line 1995, <GEN23>
> line 2.
>
> Mysql is running on port 3308 and using "/tmp/mysql2.sock" and NOT the
> "/tmp/mysql.sock"
When you specify host=localhost to a mysql client, it will always try to
use the socket interface instead. I think that is probably what is
happening.
/Per Jessen, Zürich
Re: SPAMD & Mysql & non standard Port
Posted by Jordi <jo...@cebria.info>.
alexw wrote:
>
> Jordi wrote on 10.08.2007 11:01:
>
>> I try to use the 3308 because I have another mysql in 3306 and the
>> SPAMD
>> don't take the information of the local.cf file
>>
>> user_scores_dsn DBI:mysql:spamassassin:localhost:3308
>>
>>
>> Mysql is running on port 3308 and using "/tmp/mysql2.sock" and NOT the
>> "/tmp/mysql.sock"
>
> You might want to try a different dsn string:
> - for port 3308:
> DBI:mysql:spamassassin;host=localhost:3308
> or
> DBI:mysql:spamassassin;host=localhost;port=3308
>
> (beware ":" and ";" difference)
>
> or for the socket:
> DBI:mysql:spamassassin;mysql_socket=/tmp/mysql2.sock
>
YES!!! It's working only changing the ":" for ":" and in my case I use the
"mysql_socket" specification.
Thanks,
Jordi
--
View this message in context: http://www.nabble.com/SPAMD---Mysql---non-standard-Port-tf4247476.html#a12088564
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.
Re: SPAMD & Mysql & non standard Port
Posted by Alex Woick <al...@wombaz.de>.
Jordi wrote on 10.08.2007 11:01:
> I try to use the 3308 because I have another mysql in 3306 and the SPAMD
> don't take the information of the local.cf file
>
> user_scores_dsn DBI:mysql:spamassassin:localhost:3308
>
>
> Mysql is running on port 3308 and using "/tmp/mysql2.sock" and NOT the
> "/tmp/mysql.sock"
You might want to try a different dsn string:
- for port 3308:
DBI:mysql:spamassassin;host=localhost:3308
or
DBI:mysql:spamassassin;host=localhost;port=3308
(beware ":" and ";" difference)
or for the socket:
DBI:mysql:spamassassin;mysql_socket=/tmp/mysql2.sock
Keep in mind that either the port or the socket is used by a mysql
client, but not both.
As a last resort, if all that is not working, modify the .my.cnf file
for the user spamassassin or spamd is running under and make these entries:
[client]
host=localhost
port=3308
or
[client]
socket=/tmp/mysql2.sock
or if you don't want to use the default .my.cnf file, give an explicit
filename in the dsn string:
DBI:mysql:spamassassin;mysql_read_default_file=/etc/mail/spamassassin/.my.cnf
and put the options into /etc/mail/spamassassin/.my.cnf.