FAQ
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>
>>>

Search Discussions

  • Alex Martelli at May 5, 2002 at 3:56 pm

    Duncan Smith wrote:

    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
    Do you have the needed permissions?


    Alex
  • Duncan Smith at May 5, 2002 at 5:30 pm
    "Alex Martelli" <aleax at aleax.it> wrote in message
    news:CCcB8.6334$zW3.168345 at news1.tin.it...
    Duncan Smith wrote:
    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
    Do you have the needed permissions?
    Yes. Just closed WinMySQLadmin 1.4 and reopened it; database gone and
    different Local IP Address? Rebooted, things seem OK and I'm back to the
    previous IP Address. Maybe this has something to do with my spam filtering
    s/ware? I'll see how it goes and kick SpamWeasel into touch if necessary.
    Cheers Alex.

    Duncan
    Alex

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMay 5, '02 at 2:39p
activeMay 5, '02 at 5:30p
posts3
users2
websitepython.org

2 users in discussion

Duncan Smith: 2 posts Alex Martelli: 1 post

People

Translate

site design / logo © 2022 Grokbase