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!

Mailman MySQL Adaptor - cannot import MySQLdb

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

  1. akreider

    akreider Registered

    Joined:
    Jul 30, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    51
    I'm trying to modify Mailman to use the Mailman MySQL adaptor - so I can store my lists in a database.

    http://loeki.tv/log/archives/81-Setting-up-Mailman-to-store-members-in-a-MySQL-database.html

    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
    db.close()



    Any ideas on what the problem might be? Why would the test script load the module, but mailman does not?
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice