MySQLdb confusion

Duncan Smith buzzard at urubu.freeserve.co.uk
Sun May 5 10:39:57 EDT 2002


I'm probably missing something (a brain?), but can anyone suggest a reason
why I don't seem to be able to drop a (currently empty) database?  Python
2.0, MySQL 3.23.49 on Win 2000.  Thanks in advance.

Duncan

>>> import MySQLdb
>>> conn = MySQLdb.connect(host="localhost", user="me", passwd="myPass")
>>> conn
<MySQLdb.connections.Connection instance at 010FD234>
>>> curs = conn.cursor()
>>> curs.execute("SHOW DATABASES")
4L
>>> curs.fetchall()
(('mysql',), ('test',), ('tester',), ('v_temp',))
>>> curs.execute("DROP DATABASE v_temp")
0L
>>> curs.execute("SHOW DATABASES")
4L
>>> curs.fetchall()
(('mysql',), ('test',), ('tester',), ('v_temp',))
>>> curs.close()
>>> conn.close()
>>> conn
<MySQLdb.connections.Connection instance at 010FD234>
>>> curs
<MySQLdb.cursors.Cursor instance at 01113EA4>
>>>





More information about the Python-list mailing list