[Mailman-Users] mailman + mysql
Mark Sapiro
mark at msapiro.net
Thu Sep 1 03:26:42 CEST 2011
On 8/31/2011 12:15 PM, Klemen Humerca wrote:
> Yes, web admin interface works and extend.py is in the place
> (/var/lib/mailman/lists/list-name). And I've been checking logs in
> /var/log/mailman. I've added this line to mm_cfg.py:
>
> MYSQL_MEMBER_DB_VERBOSE = "4"
>
> and I've found this in error log:
>
> Aug 31 13:03:14 2011 (16396) Uncaught runner exception: (1064, "You have
> an error in your SQL syntax; check the manual that corresponds to your
> MySQL server version for the right syntax to use near 'TYPE=MyISAM' at
> line 24")
> Aug 31 13:03:14 2011 (16396) Traceback (most recent call last):
> File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 113, in _oneloop
> self._onefile(msg, msgdata)
> File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 151, in _onefile
> mlist = self._open_list(listname)
> File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 196, in _open_list
> mlist = MailList.MailList(listname, lock=False)
> File "/usr/lib/mailman/Mailman/MailList.py", line 125, in __init__
> func(self)
> File "/var/lib/mailman/lists/clani/extend.py", line 6, in extend
> list._memberadaptor = MysqlMemberships(list)
> File "/usr/lib/mailman/Mailman/MysqlMemberships.py", line 92, in __init__
> message = "MysqlMemberships " \
> File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 163,
> in execute
> self.errorhandler(self, exc, value)
> File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line
> 35, in defaulterrorhandler
> raise errorclass, errorvalue
> ProgrammingError: (1064, "You have an error in your SQL syntax; check
> the manual that corresponds to your MySQL server version for the right
> syntax to use near 'TYPE=MyISAM' at line 24")
>
> Aug 31 13:03:14 2011 (16396) SHUNTING:
> 1314788594.28422+2ce0db1b09dddbc0a14b8eaa0701fa568dcd9196
> Aug 31 13:03:14 2011 qrunner(16396): Exception
> exceptions.AttributeError : "MysqlMemberships instance has no attribute
> 'conn'" in <bound method MysqlMemberships.__del__ of
> <Mailman.MysqlMemberships.MysqlMemberships instance at 0x9e07d0c>> ignored
>
> It looks like there is something wrong in MysqlMemberships.py file? I've
> checked the file but there is not 'TYPE=MyISAM' in it....
Lines 90 through 97 of the MysqlMemberships.py I think you are using say
if mm_cfg.MYSQL_MEMBER_DB_VERBOSE:
# Message to indicate successful init.
message = "MysqlMemberships " \
+ "$Revision: 1.69 $ initialized with host: %s (%s)" % (
mm_cfg.connection.get_host_info(),
mm_cfg.connection.get_server_info() )
syslog('error', message)
syslog('mysql', message)
Lines 92 through 95 are one long statement. There is something wrong
with the mm_cfg.connection object. This should be a MySQL database
connection established earlier by the call to self._dbconnect() at line
67. This in turn did
try:
mm_cfg.connection = MySQLdb.connect(
passwd=mm_cfg.MYSQL_MEMBER_DB_PASS,
db=mm_cfg.MYSQL_MEMBER_DB_NAME,
user=mm_cfg.MYSQL_MEMBER_DB_USER,
host=mm_cfg.MYSQL_MEMBER_DB_HOST)
mm_cfg.cursor = mm_cfg.connection.cursor()
There is probably some issue with your definitions of
MYSQL_MEMBER_DB_PASS, MYSQL_MEMBER_DB_NAME, MYSQL_MEMBER_DB_USER and/or
MYSQL_MEMBER_DB_HOST in mm_cfg.py
--
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users
mailing list