[mod_python] Python and Mysql

tony sarendal dualcyclone at gmail.com
Fri Oct 6 07:04:37 EDT 2006


MySQL-python and mod_python works together just fine.
On one of my openbsd3.8 boxes I use for testing:
Apache/2.0.55 (Unix) mod_python/3.1.4 Python/2.3.5
It has MySQL-python-1.2.0 on it.

import MySQLdb
...
db = MySQLdb.connect(host=dbhost,user=dbuser,passwd=dbpass,db=dbname)
cursor = db.cursor()
cursor.execute('SELECT whatevercolumn FROM whatevertable')
rval = cursor.fetchall()
...

/Tony


On 05/10/06, Sean Davis <sdavis2 at mail.nih.gov> wrote:
>
> edgar mortiz wrote:
> > hello all!
> >
> >   can anyone give solutions on how python code can talk to mysql?
> > I've tried mysql-python but with no luck, i was wondering that any of
> > you would be able to give some recommendations on alternatives.
> Edgar,
>
> This list is for mod_python, not python.  However, a google search for
> "mysql python tutorials" will turn up many hits.
>
> Sean
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>



-- 
Tony Sarendal - dualcyclone at gmail.com
IP/Unix
       -= The scorpion replied,
               "I couldn't help it, it's my nature" =-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20061006/6ad994c8/attachment.html


More information about the Mod_python mailing list