Menu

Connection problem under Linux

Help
2001-09-13
2012-09-19
  • Mark Howson

    Mark Howson - 2001-09-13

    Hi,

    I can't seem to get the latest MySQLdb working on my Linux machine (RH7, Linux 2.4.9, Python 2.1.1/MySQL 3.23.39/MySQLdb 0.9.1c1, all compiled from source)

    When I try to connect to a database (for example):

    import MySQLdb
    MySQLdb.connect(db='XXXX',host='XXXXX', user='XXXXX', password='XXXXXX')

    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
      File "/usr/local/lib/python2.1/site-packages/MySQLdb/__init__.py", line 63, in Connect
        return apply(Connection, args, kwargs)
      File "/usr/local/lib/python2.1/site-packages/MySQLdb/connections.py", line 58, in __init__
        self._db = apply(connect, args, kwargs2)
    _mysql_exceptions.InternalError: (-1, 'connection is closed')
    >>>

    The same code works fine under Python 2.1/MySQLdb 0.9.0 on Win32 (on another machine). I can access and query the database fine from the Linux box using mysql.

    Any ideas? I'm a mysql newbie, btw.

     
    • Andy Dustman

      Andy Dustman - 2001-09-13

      There is some (other) error that is occuring during connection, and this is not being reported correctly. Fixed in CVS.

       
      • Mark Howson

        Mark Howson - 2001-09-14

        Heh. With the extra traceback code in CVS, I fixed the problem in about 30 seconds :)

        Thanks for the help (and the quick reply).

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.