Failing connection with MySQLdb on Mac OS X

Discussion in 'Python' started by Stephen Roderick, May 29, 2004.

  1. Getting weird error, and I was wondering if anyone had any suggestions.
    My system appears to satisfy all MySQLdb prerequisities in terms of
    python, mysql, etc. Also, phpMyAdmin works fine with mysql, leading me
    to believe that my installation of MySQLdb is at fault. Any ideas?

    TIA


    For file test1.py (for appropriate values of user and passwd, and
    database location exists)

    import MySQLdb
    db = MySQLdb.Connect ( host="localhost", user="yyy", passwd="xxx",
    db="location" )

    Error is :

    Traceback (most recent call last):
    File "test1.py", line 3, in ?
    db="location" )
    File
    "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    python2.3/site-packages/MySQLdb/__init__.py", line 63, in Connect
    return apply(Connection, args, kwargs)
    File
    "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    python2.3/site-packages/MySQLdb/connections.py", line 115, in __init__
    self._make_connection(args, kwargs2)
    File
    "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    python2.3/site-packages/MySQLdb/connections.py", line 41, in
    _make_connection
    apply(super(ConnectionBase, self).__init__, args, kwargs)
    _mysql_exceptions.InternalError: (-1, 'connection is closed')
    Stephen Roderick, May 29, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Skip Montanaro

    Re: Problem with MySQLdb on Mac OS X...

    Skip Montanaro, Jul 12, 2003, in forum: Python
    Replies:
    5
    Views:
    379
    Michael S. Jessop
    Jul 16, 2003
  2. merman

    Mac OS and MySQLdb

    merman, Jan 27, 2005, in forum: Python
    Replies:
    3
    Views:
    296
    T. Kaufmann
    Jan 28, 2005
  3. TK
    Replies:
    4
    Views:
    484
    Skip Montanaro
    Feb 11, 2005
  4. geert
    Replies:
    8
    Views:
    382
    Graham Dumpleton
    Mar 19, 2008
  5. PS.OHM
    Replies:
    2
    Views:
    457
    Ned Deily
    Feb 1, 2010
Loading...

Share This Page