Re: SQL install with mSQL driver

2005-04-13 Thread alan premselaar
Gary W. Smith wrote:
Hello,
Im using 3.0.x on RHEL 3 right now in our production environment and 
was looking at setting up a new test environment.  We use MySQL for the 
common bayes DB which is working well for us in production.

Today I tried installing the same packages for Perl that I did for our 
production installs which require DBD::mSQL.  When I do an install of 
this package it fails miserably.  Googling around it appears that this 
package is, or is being, deprecated or unsupported. 

Is there an alternate package that I should be using?  Some of the 
articles I have read recommend that we use DBD::mysql instead of 
DBD::mSQL.  Does anyone know if this will work in place of the other 
package?

Gary Wayne Smith
Gary,
  I'm not a database expert by any means, but I've done a bit with the 
DBI and MySQL.  My understanding is that DBD::mSQL is an interface to a 
different SQL server than MySQL, although I don't remember which one off 
the top of my head.

If you're using MySQL, you want to use the DBD::mysql module.  I'd be 
surprised if DBD::mSQL worked at all with MySQL.

hope this helps.
Alan


RE: SQL install with mSQL driver

2005-04-13 Thread Gary W. Smith
Alan, 

I have installed DBD::mysql and it still doesn't work.  The install file
says that DBD::mSQL is required and the options that I specified when we
installed it was for mysql (as the mSQL diver is covers it as well).

It's funny though that AWL is logging to the DB.  Also, something to
note, is that in production we are running 3.0.1 and this is 3.0.2.
Maybe it's not required and the code is just broken.  Unfortunately my
older dev environment is down otherwise I would try upgrading the 3.0.2
to see if it has the same problems.

Here is the specific error:

Apr 12 17:22:44 pxtoakdev04 spamd[3378]: Use of uninitialized value in
concatenation (.) or string at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/SQL.pm line
157, GEN2 line 2. 
Apr 12 17:22:44 pxtoakdev04 spamd[3378]: Use of uninitialized value in
numeric ne (!=) at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/SQL.pm line
159, GEN2 line 2. 
Apr 12 17:22:44 pxtoakdev04 spamd[3378]: Use of uninitialized value in
concatenation (.) or string at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/SQL.pm line
160, GEN2 line 2. 
Apr 12 17:22:44 pxtoakdev04 spamd[3378]: bayes: Database version  is
different than we understand (3), aborting! at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/SQL.pm line
160, GEN2 line 2.

Local.cf

auto_whitelist_factory Mail::SpamAssassin::SQLBasedAddrList
user_awl_dsn DBI:mysql:spamassassin:10.0.0.41
user_awl_sql_usernamespamassassinuser
user_awl_sql_passwordspamassassinpass

bayes_store_module Mail::SpamAssassin::BayesStore::SQL
bayes_sql_dsn  DBI:mysql:spamassassin:10.0.0.41
bayes_sql_username spamassassinuser
bayes_sql_password spamassassinpass


 -Original Message-
 From: alan premselaar [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 12, 2005 6:12 PM
 To: Gary W. Smith
 Cc: [EMAIL PROTECTED]
 Subject: Re: SQL install with mSQL driver
 
 
 Gary,
 
I'm not a database expert by any means, but I've done a bit with
the
 DBI and MySQL.  My understanding is that DBD::mSQL is an interface to
a
 different SQL server than MySQL, although I don't remember which one
off
 the top of my head.
 
 If you're using MySQL, you want to use the DBD::mysql module.  I'd be
 surprised if DBD::mSQL worked at all with MySQL.
 
 hope this helps.
 
 Alan


Re: SQL install with mSQL driver

2005-04-13 Thread alan premselaar
Gary W. Smith wrote:
Alan, 

I have installed DBD::mysql and it still doesn't work.  The install file
says that DBD::mSQL is required and the options that I specified when we
installed it was for mysql (as the mSQL diver is covers it as well).
It's funny though that AWL is logging to the DB.  Also, something to
note, is that in production we are running 3.0.1 and this is 3.0.2.
Maybe it's not required and the code is just broken.  Unfortunately my
older dev environment is down otherwise I would try upgrading the 3.0.2
to see if it has the same problems.
Here is the specific error:
Apr 12 17:22:44 pxtoakdev04 spamd[3378]: Use of uninitialized value in
concatenation (.) or string at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/SQL.pm line
157, GEN2 line 2. 
Apr 12 17:22:44 pxtoakdev04 spamd[3378]: Use of uninitialized value in
numeric ne (!=) at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/SQL.pm line
159, GEN2 line 2. 
Apr 12 17:22:44 pxtoakdev04 spamd[3378]: Use of uninitialized value in
concatenation (.) or string at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/SQL.pm line
160, GEN2 line 2. 
Apr 12 17:22:44 pxtoakdev04 spamd[3378]: bayes: Database version  is
different than we understand (3), aborting! at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/SQL.pm line
160, GEN2 line 2.

Local.cf
auto_whitelist_factory Mail::SpamAssassin::SQLBasedAddrList
user_awl_dsn DBI:mysql:spamassassin:10.0.0.41
user_awl_sql_usernamespamassassinuser
user_awl_sql_passwordspamassassinpass
bayes_store_module Mail::SpamAssassin::BayesStore::SQL
bayes_sql_dsn  DBI:mysql:spamassassin:10.0.0.41
bayes_sql_username spamassassinuser
bayes_sql_password spamassassinpass
Gary,
  these calls (DBI:mysql:spamassassin) are definitely telling the 
system to use DBD::mysql  (not DBD::mSQL)

based on this line:
 Apr 12 17:22:44 pxtoakdev04 spamd[3378]: bayes: Database version  is
 different than we understand (3), aborting! at
it looks like the database either isn't configured properly or it's 
corrupted.

try running sa-learn --dump magic to see what it reports, and assuming 
it fails you may then want to try sa-learn -D --lint

are both your production (3.0.1) and this new (3.0.2) machine pointing 
to the same database?

alan


Re: SQL install with mSQL driver

2005-04-13 Thread Michael Parker
On Tue, Apr 12, 2005 at 06:59:27PM -0700, Gary W. Smith wrote:
 
 I have installed DBD::mysql and it still doesn't work.  The install file
 says that DBD::mSQL is required and the options that I specified when we
 installed it was for mysql (as the mSQL diver is covers it as well).
 

Can you please point out where in the install file this is?

 Apr 12 17:22:44 pxtoakdev04 spamd[3378]: bayes: Database version  is
 different than we understand (3), aborting! at
 /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/SQL.pm line
 160, GEN2 line 2.

This is a pretty good indication that you did not use the supplied
bayes_mysql.sql file to create your database.  If you did it would
have created and inserted the proper version number into the database.

Please read sql/README.bayes and follow the instructions there.
Perhaps you did and it's just a permissions problem that you are
seeing.

Michael


pgpO8kKbJWq7E.pgp
Description: PGP signature


RE: SQL install with mSQL driver

2005-04-13 Thread Gary W. Smith
http://spamassassin.apache.org/dist/sql/README

Clearly states:

DBI-1.20
Msql-Mysql-modules-1.2219
perl v5.6.1

Are for the database I did complete export of the production data
structure and then imported it into the new mysql database for testing.
But I think you're on to something.  I pointed the instance to
production and used a bogus username and it created it in the bayes_vars
database.  I'll need to check into why the database isn't cooperating.  

Gary


-Original Message-
From: Michael Parker [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 12, 2005 8:10 PM
To: Gary W. Smith
Cc: users@spamassassin.apache.org
Subject: Re: SQL install with mSQL driver

On Tue, Apr 12, 2005 at 06:59:27PM -0700, Gary W. Smith wrote:
 
 I have installed DBD::mysql and it still doesn't work.  The install
file
 says that DBD::mSQL is required and the options that I specified when
we
 installed it was for mysql (as the mSQL diver is covers it as well).
 

Can you please point out where in the install file this is?

 Apr 12 17:22:44 pxtoakdev04 spamd[3378]: bayes: Database version  is
 different than we understand (3), aborting! at
 /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/BayesStore/SQL.pm
line
 160, GEN2 line 2.

This is a pretty good indication that you did not use the supplied
bayes_mysql.sql file to create your database.  If you did it would
have created and inserted the proper version number into the database.

Please read sql/README.bayes and follow the instructions there.
Perhaps you did and it's just a permissions problem that you are
seeing.

Michael


RE: SQL install with mSQL driver

2005-04-13 Thread Gary W. Smith
Michael, 

You're 100% on the money.  I went back and found that the version table
was empty.  I populated it with 3 and it magically works.  One more
item for our intrawiki.  

That's curveball with the missing entry just had me all messed up.

Thanks, 

Gary Wayne Smith



-Original Message-
From: Michael Parker [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 12, 2005 8:10 PM
To: Gary W. Smith
Cc: users@spamassassin.apache.org
Subject: Re: SQL install with mSQL driver

This is a pretty good indication that you did not use the supplied
bayes_mysql.sql file to create your database.  If you did it would
have created and inserted the proper version number into the database.

Please read sql/README.bayes and follow the instructions there.
Perhaps you did and it's just a permissions problem that you are
seeing.

Michael


SQL install with mSQL driver

2005-04-12 Thread Gary W. Smith
Title: SQL install with mSQL driver






Hello, 

Im using 3.0.x on RHEL 3 right now in our production environment and was looking at setting up a new test environment. We use MySQL for the common bayes DB which is working well for us in production.

Today I tried installing the same packages for Perl that I did for our production installs which require DBD::mSQL. When I do an install of this package it fails miserably. Googling around it appears that this package is, or is being, deprecated or unsupported. 

Is there an alternate package that I should be using? Some of the articles I have read recommend that we use DBD::mysql instead of DBD::mSQL. Does anyone know if this will work in place of the other package?

Gary Wayne Smith