Mailman MySQL Adaptor - cannot import MySQLdb


Jul 30, 2010
I'm trying to modify Mailman to use the Mailman MySQL adaptor - so I can store my lists in a database.

I've got cPanel, Centos and Mailman running on a Virtual Private Server.

However when I follow the instructions for installing the MySQL adaptor, Mailman gives me an error:
"ImportError: No module named MySQLdb"

I've installed the MySQLdb module (for python), and am able to get a simple test script to run.

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

Any ideas on what the problem might be? Why would the test script load the module, but mailman does not?
Thread starter Similar threads Forum Replies Date
S Email 1
M Email 1
D Email 3
J Email 7
P Email 1