[ZODB-Dev] Re: Gadfly with ZEO clients - anyone trying this?

Chris Withers lists at simplistix.co.uk
Fri Feb 27 06:07:39 EST 2004


Ken Wasetis wrote:

> That's exactly what I ended up doing.  Ironically enough, one of the few 
> things Microsoft did well (abstracting the database access layer through 
>  ODBC so that you can connect to any db very easily, though not as 
> efficiently, of course) was harder to implement with Zope/Python due to 
> the fact that the ZODBCDA relies on Python 2.1 - and all more recent 
> versions of Zope use a more recent version of Python (I'm using Python 
> 2.3.2 with Zope 2.7.)

You should probably have used eGenix's mxODBC ;-)

> I looked into that path, there was no download which included the C 
> binaries for Windows, thus necessitating the MS Visual Studio C compiler 
> - just not worth my troubles/money.  

You don't HAVE to use a M$ compiler...

 > But yesterday I was please to find
> an .exe installer that included the C binaries within.

...and those have been available for years.

> The first link alludes to the fact that the mysqldb-python installer on 
> Windows checks the registry for Python installations - there is no 
> config file or commandline argument to tell the installer to use the 
> zope/lib/python.  

Indeed...

> Instead, I had to download the same version of Python 
> that my Zope uses from python.org so that it's installer would put an 
> entry in the Windows registry and so the mysqldb-python installer would 
> then find something to use.  

Yep, but then who DOESN'T have python installed on their system anyway <0.3 wink>

> link is that once the mysqldb installer is done, you'll need to manually 
> move the 7 files and 1 folder mentioned into the zope/lib/python (or 
> whatever python home you're using for Zope.)

Correct.

> Even if you get the mysqldb-python installer to work/compile the Python 
> source, and you then copy the ZMySQLDA product to your 
> zope/lib/python/Products folder (and you restart Zope and you see this 
> as an installed product in the ZMI), when you attempt to add a MySQLDA 
> connection to your application/site, it will (depending on your version 
> of various things) still fail, with a 'server_capabilities' 
> AttributeError.

I've never seen that...

> After all this mess, I'm able to connect to MySQL, create tables, run 
> queries, etc.  All is well now.

:-)

> The big test for me was confirming that my MySQL connection object could 
> be shared from various ZEO clients.  This works like a charm.  I created 
> the connection from the ZMI of one ZEO client instance and tested it 
> from others.  No problemo.

Yep, they'll each have a connection to MySQL that's seperate, though...

cheers,

Chris

PS: This probably belongs on zope-db at zope.org rather than zodb-dev at zope.org...

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk




More information about the ZODB-Dev mailing list