[Spambayes] Problems with switching to MySQL for dbase

Woo, Christopher Christopher.Woo at pepperdine.edu
Tue Oct 12 00:26:30 CEST 2004


Well, it happened. My databases got corrupted. No sense in crying over spilt
milk, but I would like to prevent further corruption, so I've decided to
migrate my databases over to MySQL, seeing as it is already running on my
SpamBayes box.

Unfortunately, I ran into several problems:

1. I could not get it to use anything other than the default settings.
Setting the database name to the string: "host:localhost user:foo
pass:foobar dbase:spambayes" resulted in spambayes attempting to access
mySQL with user name "@localhost" which makes me suspect it's parsing the
string incorrectly. I got around this by granting the defaults access to my
spambayes database, but upon doing so, I got...

2. This error:
============================================================
C:\spambayes\scripts>sb_imapfilter.py -b
SpamBayes IMAP Filter Version 0.4 (May 2004)
and engine SpamBayes Engine Version 0.3 (January 2004).

Traceback (most recent call last):
  File "C:\spambayes\scripts\sb_imapfilter.py", line 1020, in ?
    run()
  File "C:\spambayes\scripts\sb_imapfilter.py", line 947, in run
    classifier = storage.open_storage(bdbname, useDBM)
  File "C:\Python23\Lib\site-packages\spambayes\storage.py", line 681, in
open_s
torage
    return klass(data_source_name)
  File "C:\Python23\Lib\site-packages\spambayes\storage.py", line 511, in
__init
__
    SQLClassifier.__init__(self, db_name)
  File "C:\Python23\Lib\site-packages\spambayes\storage.py", line 317, in
__init
__
    self.load()
  File "C:\Python23\Lib\site-packages\spambayes\storage.py", line 537, in
load
    self.db.rollback()
  File "C:\Python23\lib\MySQLdb\connections.py", line 144, in rollback
    NotSupportedError, "Not supported by server")
  File "C:\Python23\lib\MySQLdb\connections.py", line 33, in
defaulterrorhandler

    raise errorclass, errorvalue
_mysql_exceptions.NotSupportedError: Not supported by server
============================================================

I suspect I've installed the MySQLdb library incorrectly in Python. Can
anyone clue me in on what I am doing wrong?

CW


More information about the Spambayes mailing list