MySQL: AttributeError: cursor

Kevin Murphy kevinmurphy9999 at
Sat Feb 11 18:40:09 CET 2012

Hi All,
I'm using Python 2.7 and having a problem creating the cursor below.
Any suggestions would be appreciated!

import sys
import _mysql

print "cursor test"

db =

cursor = db.cursor()

cursor test

Traceback (most recent call last):
File "C:\Python27\", line 8, in <module>
cursor = db.cursor()
AttributeError: cursor

More information about the Python-list mailing list