Newbie: How to connect to MySQL?

Steve Holden sholden at
Wed Jan 15 17:43:11 CET 2003

"Eduardo Cancino" <lalo at> wrote in message
news:mailman.1042643607.2959.python-list at
> Hi everybody!
> I downloaded the mysql-python from sourceforge, and I tried to install
> it on my Mac0S 10.2.1
> but even i have the Developer tools the:
> python build
> python install
> commands doesn't find my compiler.
> I looked in, some of this but didn't find it.
> Where I cand find a installing tutorial or something i can get to start
> programming python with databases?
> Is there a db module like dbi in perl?
> And the cgi module works as the perl one?


I can't answer your question as to why your command-line isn't finding the
Python interpreter. That's another issue. However, if you're sure you have
/usr/bin/python then as long as is marked as executable the command build

should work.

As far as your questions about "is there a db module", Python database
modules should conform the the Python DB API version 2, thereby offering a
reasonably standard interface. You can find a description at

The MySQLdb module you have downloaded offers a fairly complete
implementation, along wiht a few added tweaks and wrinkles like "dictionary

As for the CGI module: walk before you run! ;-)

Steve Holden                        
Python Web Programming       
Bring your musical instrument to PyCon!

More information about the Python-list mailing list