[Mailman-Developers] Mailman MySQL adaptor - MySQLdb module error
Aaron Kreider
aaron at campusactivism.org
Thu Aug 5 21:28:29 CEST 2010
I'm trying to get the Mailman MySQL adaptor to work, while we're
waiting for Mailman 3 to be finished. I'd love some help!
I followed the instructions on:
http://loeki.tv/log/archives/81-Setting-up-Mailman-to-store-members-in-a-MySQL-database.html
I have a VPS (virtual private server) running Centos, cPanel, and
Mailman 2.1.13.
I create a new list to test the adaptor. When I go to the list's page
it gives me an error. Mailman's error log says "ImportError: No module
named MySQLdb".
I've installed the MySQLdb module and am able to run a simple test
script at the command line (that connects to the mysql database),
without a problem. So what could be the problem?
My setup has two versions of python running - one in /usr/bin/python and
another in /usr/bin/python2.4, however both of them run the test script
without a problem. I'm wondering if having two versions might be the
cause? Or could there be a user permissions issue?
Test Script:
import MySQLdb
# Open database connection
db = MySQLdb.connect("localhost","testuser","test123456","TESTDB" )
# prepare a cursor object using cursor() method
cursor = db.cursor()
# execute SQL query using execute() method.
cursor.execute("SELECT VERSION()")
# Fetch a single row using fetchone() method.
data = cursor.fetchone()
print "Database version : %s " % data
# disconnect from server
db.close()
More information about the Mailman-Developers
mailing list