[Help] Setting up MySQLconnection
I am trying to set up a mySQL DB adapter in Zope. I am somewhat of a Zope and Linux newbie so I am probably doing something dumb. Here is what I have done: - Downloaded MySQL-python-0.9.0 to the Zope install dir; - tar -xzvf MySQL-python-0.9.0.tar.gz - cd MySQL-python-0.9.0 At this point I looked at the README. It requires Python 1.5.2 or higher (I think we have 2.2) and a recent MySQL (which I believe we have). I did not edit setup.py because we are running Red Hat. I then do - python setup.py build and it chugs along until it gets to the gcc _mysql.c when it gives me an error _mysql.c: In function `_mysql__fetch_row': _mysql.c: too many arguments to function `PyTuple_Resize' This looks to me like a call to the Python API and it appears that my libraries define this differently from what the code expects. Any help gratefully appreciated. - rmgw http://www.electricfish.com/hawkfish/ ---------------------------------------------------------------------------- Richard Wesley Electric Fish, Inc. hawkfish@electricfish.com "There's nothing intellectual about wandering around Italy in a big shirt, trying to get laid." - Rowan Atkinson, "Black Adder:Ink and Incapability"
Richard Wesley wrote:
I am trying to set up a mySQL DB adapter in Zope. I am somewhat of a Zope and Linux newbie so I am probably doing something dumb. Here is what I have done:
- Downloaded MySQL-python-0.9.0 to the Zope install dir; - tar -xzvf MySQL-python-0.9.0.tar.gz - cd MySQL-python-0.9.0
At this point I looked at the README. It requires Python 1.5.2 or higher (I think we have 2.2) and a recent MySQL (which I believe we have). I did not edit setup.py because we are running Red Hat. I then do
Since Zope is not supported under Python 2.2, I *strongly* recommend building everything with Python 2.1.2 instead.
- python setup.py build
and it chugs along until it gets to the gcc _mysql.c when it gives me an error
_mysql.c: In function `_mysql__fetch_row': _mysql.c: too many arguments to function `PyTuple_Resize'
This looks to me like a call to the Python API and it appears that my libraries define this differently from what the code expects.
I don't actually know if PyTuple_Resize changes in Python 2.2 vs 2.1, but it may have. I would also recommend that you grab the latest sources for the Python MySQL driver from SourceForge.net; I believe the ZMySQLDA package includes everything you need. -- Matt Kromer Zope Corporation http://www.zope.com/
At 1:55 PM -0500 3/25/02, Matthew T. Kromer wrote:
Richard Wesley wrote:
I am trying to set up a mySQL DB adapter in Zope. I am somewhat of a Zope and Linux newbie so I am probably doing something dumb. Here is what I have done:
- Downloaded MySQL-python-0.9.0 to the Zope install dir; - tar -xzvf MySQL-python-0.9.0.tar.gz - cd MySQL-python-0.9.0
At this point I looked at the README. It requires Python 1.5.2 or higher (I think we have 2.2) and a recent MySQL (which I believe we have). I did not edit setup.py because we are running Red Hat. I then do
Since Zope is not supported under Python 2.2, I *strongly* recommend building everything with Python 2.1.2 instead.
Is 2.1.1 OK? It appears that 2.2 is messing up someone else and we are going . There appear to be a number of issues here and we are going to start by taking your advice and going back to 2.1.1. Hopefully everything will start working then. - rmgw http://www.electricfish.com/hawkfish/ ---------------------------------------------------------------------------- Richard Wesley Electric Fish, Inc. hawkfish@electricfish.com "By eleven in the morning, math had been going on for two hours." - Rosemary Wells, "Voyage to the bunny Planet:First Tomato"
Richard Wesley wrote:
Is 2.1.1 OK? It appears that 2.2 is messing up someone else and we are going .
There appear to be a number of issues here and we are going to start by taking your advice and going back to 2.1.1. Hopefully everything will start working then.
2.1.1 is OK with the caveat that there are known problems with it ;) Under certain circumstances 2.1.1 can cause segmentation faults due to a few glitches that were patched with 2.1.2. -- Matt Kromer Zope Corporation http://www.zope.com/
At 3:11 PM -0500 3/25/02, Matthew T. Kromer wrote:
Richard Wesley wrote:
Is 2.1.1 OK? It appears that 2.2 is messing up someone else and we are going .
There appear to be a number of issues here and we are going to start by taking your advice and going back to 2.1.1. Hopefully everything will start working then.
2.1.1 is OK with the caveat that there are known problems with it ;) Under certain circumstances 2.1.1 can cause segmentation faults due to a few glitches that were patched with 2.1.2.
Well, the situation has changed again and we are running 2.2 and the 0.9.1 mysql library. Given that all I am trying to do right now is develop code (as opposed to deploying anything) is there any hard in the short term in using Zope 2.5 with Python 2.2? And if this is OK for the short term, what version of ZMySQLDA should I try to use? TIA, - rmgw http://www.electricfish.com/hawkfish/ ---------------------------------------------------------------------------- Richard Wesley Electric Fish, Inc. hawkfish@electricfish.com "If we're not careful, we could have a farce on our hands!" - Tom Stoppard, _On The Razzle_
participants (2)
-
Matthew T. Kromer -
Richard Wesley