MySQL InterfaceError

Joe joe at
Tue Jun 5 21:15:22 CEST 2007

>File "build/bdist.linux-i686/egg/MySQLdb/", line 147, in execute

>    charset = db.character_set_name()


>InterfaceError: (0, '')


We got it working.  It was caused by passing a database connection to a


import MySQLdb

import module_name

connection = MySQLdb.connect(host='localhost', user='user',
passwd='password', db='database')

module = module_name.ClassName(connection)


But, when the connection was made within the module itself, it would work
flawlessly every time.  Can someone explain to me why this is?  



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list