[Mailman-Developers] Mailman MySQL adaptor - MySQLdb module error

Mark Sapiro mark at msapiro.net
Fri Aug 6 07:34:54 CEST 2010


Aaron Kreider wrote:

>  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.


Did you install Mailman yourself or are you using cPanel's Mailman. If
the latter, did you modify the paths in the above instructions to
match cPanel.

See the FAQ at <http://wiki.list.org/x/sYA9>.


>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.


In a typical CentOS RPM install, /usr/bin/python and /usr/bin/python2.4
are hard links to the same file.

How many /usr/lib/python* directories do you have?


>I'm wondering if having two versions might be the 
>cause?  Or could there be a user permissions issue?


How was Mailman configured? Having two or even more versions of Python
should not be a problem as long as the one Mailman was configured to
use has MySQLdb installed.

Is Mailman running? What happens if you send a 'help' command by email
to the new list's -request address?

I don't think this is a permissions issue as MySQLdb should be world
searchable/readable, but I suppose it could be a SELinux issue if
SELinux is enabled.

If you run

strings /path/to/mailman/cgi-bin/listinfo

The output should contain amongst much other stuff the path of the
python used by the CGI scripts.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Developers mailing list