[Zope] MySQLDA, Mac OSX connection problem
Duncan McGreggor
cms at adytumsolutions.com
Tue Sep 23 11:30:12 EDT 2003
Avni Khatri wrote:
> Hi,
>
> I'm new to zope / plone. I was wondering if someone
> could help me out.
>
> - I installed plone on mac osx (using the binary)
> and everything works great.
> - I then wanted to connect to an RDBMS. So I
> installed mysql on the same box
> (osx) and that works great. I gave my db root
> user a password and set up the
>
> permissions.
> - I then installed mysql-python package and that
> seemed to go well.
> - I next installed ZMySQLDA by putting it in the
> the zope python dir and restarted zope
> - The product shows up. Ican add a "Z MySQL
> Database Connection" object type
> no problem. It says the connection is open.
> - However when I try the "Test" tab, the resulting
> page always has the following error:
>
> _mysql_exceptions.InternalError
> Sorry, a site error occurred.
> Traceback (innermost last):
> Module ZPublisher.Publish, line 150, in
> publish_module
> Module Products.Localizer, line 58, in
> new_publish
> Module ZPublisher.Publish, line 106, in
> publish
> Module Zope.App.startup, line 222, in abort
> Module ZODB.Transaction, line 135, in abort
> Module Shared.DC.ZRDB.TM, line 60, in abort
> Module Products.ZMySQLDA.db, line 328, in
> _abort
> InternalError: (-1, 'connection is closed')
>
> - My connection string is db at ip username password
> which all the docs say is correct? Am I missing
> something?
>
> I am running Plone 1.0.5, Zope 2.6.2b5, Mac OS
> 10.2.6, MySQL 4.0.15
>
> Does anyone have any ideas / suggestions? I've
> perused the mailing lists and web sites and
> haven't been able to find a solution
> that works. I'd appreciate any help.
>
>
> Thanks much,
> Avni
I have had similar problems in the past... what version of the ZMySQLDA
and MySQL for python are you using? If you tried it with 0.9.2+, you can
take my advice below; here's what I did that made it work:
1) Go to sourceforge and get the two versions that work together
(discovered by trial and error... they had close release dates):
http://sourceforge.net/project/showfiles.php?group_id=22307&release_id=102893
MySQL-python-0.9.1.tar.gz
ZMySQLDA-2.0.8.tar.gz
2) Uninstall the ZMySQLDA (delete the dir in the Products dir)
3) Either remove the mysql python libs or trust to an over-write... YMMV
4) tar xvfz the downloaded files, edit as necessary (I think that I have
to edit my setup.py file for the mysql python libs), and place the DA in
the Products dir.
When I did it this way, everything came up great for me.
Honestly, though, I have found working with Zope's ZODB most rewarding
and for stuff that requires a RDBMS, I have found Postgres to work best
for me.
Hope that helps,
duncan
More information about the Zope
mailing list