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):
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
There is some (other) error that is occuring during connection, and this is not being reported correctly. Fixed in CVS.
Heh. With the extra traceback code in CVS, I fixed the problem in about 30 seconds :)
Thanks for the help (and the quick reply).