MySQLdb - parameterised SQL - how to see resulting SQL ?

Damjan gdamjan at gmail.com
Thu May 18 00:09:01 EDT 2006


> ... i would be interested in seeing what the actual SQL used by the
> .execute looks like after the replacements have been done. Is there a
> way of doing this ?

On my development machine I'm using the "--log" argument to MySQL so that it
logs all queries and connections. I wouldn't recommend that on a production
machine though.

The logfile is stored in /var/lib/mysql/<hostname>.log


-- 
damjan



More information about the Python-list mailing list