Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mailman MySQL Adaptor - cannot import MySQLdb

Discussion in 'E-mail Discussions' started by akreider, Aug 6, 2010.

  1. akreider

    akreider Registered

    Jul 30, 2010
    Likes Received:
    Trophy Points:
    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?

Share This Page