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

    Joined:
    Jul 30, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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