I'm porting a fairly old mod_python application from Windows to Linux. It has to run in a specific environment for our client, so that it will be supported by Red Hat. Specifically, Red Hat Enterprise Linux 4. That means Python 2.3.4, mod_python 3.1.3, and MySQL 4.1.7 (we were using MySQL 4.0 under Windows).
I neglected to mention that I tried MySQL-python-1.0.0-1.RHEL4.1.i386.rpm, which exhibited this error, and python-module-MySQLdb-1.2.0-alt0.1.i586.rpm and python-mysql-1.1.1-2.1.i586.rpm, which were incompatible with my version of python and libmysqlclient_r.so
I also neglected to mention that I can modify/compile MySQLdb to fix the problem, if that's possible. They're mainly concerned with full applications.
Thanks again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, nevermind. I finally figured out that downloading the source code for MySQLdb and compiling it locally would mean it would be compiled with the same GCC. After that, it worked great.
I'm following up so others know, since this does seem to come up quite a bit.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm porting a fairly old mod_python application from Windows to Linux. It has to run in a specific environment for our client, so that it will be supported by Red Hat. Specifically, Red Hat Enterprise Linux 4. That means Python 2.3.4, mod_python 3.1.3, and MySQL 4.1.7 (we were using MySQL 4.0 under Windows).
I'm getting the error:
self.db = MySQLdb.connect(host=hst,user=usr,passwd=password,db=dbname,port=inport)
File "/usr/lib/python2.3/site-packages/MySQLdb/init.py", line 64, in Connect
return apply(Connection, args, kwargs)
File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 117, in init
self.converter[types.StringType] = self.string_literal
TypeError: object does not support item assignment
Having RTFForum, I understand this is a GCC version mismatch with MySQL
(see http://sourceforge.net/tracker/index.php?func=detail&aid=761258&group_id=22307&atid=374932)
This thread talks about recompiling MySQL, which is not an option for me.
Is there some version of MySQLdb that will not have this problem, yet work with that version of MySQL and python?
Thanks in advance.
I neglected to mention that I tried MySQL-python-1.0.0-1.RHEL4.1.i386.rpm, which exhibited this error, and python-module-MySQLdb-1.2.0-alt0.1.i586.rpm and python-mysql-1.1.1-2.1.i586.rpm, which were incompatible with my version of python and libmysqlclient_r.so
I also neglected to mention that I can modify/compile MySQLdb to fix the problem, if that's possible. They're mainly concerned with full applications.
Thanks again.
OK, nevermind. I finally figured out that downloading the source code for MySQLdb and compiling it locally would mean it would be compiled with the same GCC. After that, it worked great.
I'm following up so others know, since this does seem to come up quite a bit.
Thanks.